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

  Sorted list adt and the binary search tree adt

Explain the differences between our specifications of the Sorted List ADT and the Binary Search Tree ADT.

  Minimal spanning tree decreasing edge dismissal

Minimal Spanning Tree Decreasing Edge Dismissal, Reverse-delete algorithm. Develop an implementation that computes the MST

  Create a java program

UserApp and PrettyPrintUtility multiple times (supplying different TransData test file names), the AutoTesterUtility PROGRAM will be the driver program.

  Distributed systems

Build robust, secure distributed systems using advanced programming techniques

  Develop a gui based java program

Designing and developing a College Registration program

  Java class, array, link list , generic class

These 14 questions covers java class, Array, link list , generic class.

  Develop a reliable transfer protocol over udp

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

  Write a java program in a netbeans project

Write a Java program in a NetBeans project

  Write a program that shows the current time and date

Write a program that shows the current time and date

  Implementation of memory management

Implementation of memory management

  Cascading style sheet to a website

Compare and contrast the process of adding JavaScript and a Cascading Style Sheet to a Website. Determine if they can be used simultaneously in a page.

  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.

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