Compute area and perimeter of a polygon

Assignment Help JAVA Programming
Reference no: EM131829

The goal is to create a project that would let a user compute area and perimeter of a polygon. Restrict the type of polygon inputs to Triangle, Quadrilateral, Pentagon, Hexagon, and Octagon only.

Your program must implement classes IsocelesTriangle, EquilateralTriangle, Rectangle, and Square, which have the appropriate inheritance relationships. Have functionality that tests if two polygons are similar.

Give the type of polynomial and its coordinates as inputs. Use abstract classes, interfaces, and exception handling where appropriate.

For pentagon, hexagon, and octagon assume that the polygon is regular i.e. all the sides are of same length. For these the input must consist of the type of polygon and length of side (example: pentagon and 7 where type is pentagon and 7 is length of each side of a pentagon). Use the following formulae's to compute the area of a regular polygon where "a" is the length of the side.

2336_Compute area and perimeter of a polygon.png

In case of a triangle or quadrilateral you may or may not have a regular polygon. If a triangle or quadrilateral is regular then it's an equilateral triangle or a square respectively. In these cases again your input will consist of the type of polygon and length of side (example: quadrilateral and 4). If a triangle or quadrilateral is not regular then the only allowed types must be an rectangle and isosceles triangle. In each of these cases your inputs will consist of three parts. The first part will be type of polygon and second and third parts will be the two different possible side. In case of a rectangle let your second input be length (l) and third input be width (w) and in case of a isosceles triangle let the second input be base(b) and the third input be height (h). Use the following formulae's for triangles and quadrilaterals.

611_Compute area and perimeter of a polygon1.png

Reference no: EM131829

Questions Cloud

C++ program to evaluate expressions combining set union : Create a C++ program to evaluate expressions combining set union, set intersection and parentheses
Financial accounting theory : prepare an essay which demonstrates their understanding about the issue
Evaluate the rtas resource requirements : Design and implement a set of classes and interfaces and use them to evaluate the RTA's resource requirements.
Identify the various costs associated with the deployment : Identify the various costs associated with the deployment, operation and maintenance of a mobile-access system. Identify the benefits to the various categories of user, arising from the addition of a mobile-access facility.
Compute area and perimeter of a polygon : Create a project that would let a user compute area and perimeter of a polygon
Standard argumentative essay : identifying a key issue or question about which there is some controversy or disagreement
Ziegler-nichols open loop tuning : Ziegler-Nichols Open Loop Tuning Often, when working with a faster loop, many people will opt only for a PI control philosophy
Creating database structure using sql : creating database structure using SQL
Describe main steps in the process of strategic management : Describe the main steps in the process of international strategic management

Reviews

Write a Review

JAVA Programming Questions & Answers

  Develop a reliable transfer protocol over udp

Develop a reliable transfer protocol over UDP. Focus on a Stop- and-Wait protocol.

  Determine the day of the week for new year''s day

This assignment contains a java project. Project evaluates the day of the week for New Year's Day.

  Distributed systems

Build robust, secure distributed systems using advanced programming techniques

  Determine if strings are equal

Complete the recursive method match in the code below which will determine whether or not two strings match.

  Plot pois on a graph

Write a JAVA program that would get the locations of all the POIs from the file and plot them on a map.

  Java project

Prompt the user for an int between lower and upper boundary.

  Rock-paper-scissors :- java problem

Design decision marks are based on how you implemented our programs/classes.

  Write a program to register students for a college

Students have names, addresses and courses. Implement the interface class RegisterStudent. RegisterStudent has one method, public boolean register, which returns the boolean value of true or false if the student is successfully registered for the ..

  Loops and files

Convert an algorithm using control structures into Java and write a while loop

  Wolves and sheep: design a game

This project is designed a game in java. you choose whether you'd like to write a wolf or a sheep agent. Then, you are assigned to either a "sheep" or a "wolf" team.

  World data app

Prepare WorldDataApp project. It implements the NameIndex portion, including creating it in SetupProgram, and searching, viewing and updating it in UserApp program.

  Write a recursive instance method

Write a recursive instance method

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd