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

  Robot preparing for competition

Create an event so that the skateboard can be controlled by game player

  Communication with an smtp server

Develop a graphical user interface based java program that can communicate with a real SMTP email server for sending emails

  File integrity checker - tripwire

Write a program that will perform some of the basic tasks accomplished by a file integrity checker such as Tripwire.

  Design a course registration system

Create an application which represents a simplified course registration system using ArrayLists and HashMaps.

  Hunt the wumpus game

Reprot on Hunt the Wumpus Game has Source Code listing, screen captures and UML design here and also, may include Javadoc source here.

  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.

  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.

  Write a recursive instance method

Write a recursive instance method

  Design and implementation of a hangman game

Design and Implementation of a Hangman game

  Loops and files

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

  Compilation and Execution - JAVA problem

Style marks are based on how your submitted code looks. Remember that good code is easily readable (and understandable) by someone who did not write it. For assignments, you should also include your name, student number, what course this is, what ass..

  Develop a reliable transfer protocol over udp

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

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