Ask Question, Ask an Expert

+61-413 786 465

info@mywordsolution.com

Ask Java Expert


Home >> Java

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

Java, Programming

  • Category:- Java
  • Reference No.:- M9717513
  • Price:- $25

Priced at Now at $25, Verified Solution

Have any Question?


Related Questions in Java

Assignment - method in our madnessthe emphasis for this

Assignment - "Method in our Madness" The emphasis for this assignment is methods with parameters. In preparation for this assignment, create a folder called Assign_3 for the DrJava projects for the assignment. A Cityscap ...

Question slideshows or carousels are very popular in

Question : Slideshows (or carousels) are very popular in websites. They allow web developers to display news or images on the website in limited space. In this code challenge, you are required to complete the JavaScript ...

In ruby the hash class inherits from enumerable suggesting

In Ruby, the Hash class inherits from Enumerable, suggesting to a programmer that Hashes are collections. In Java, however, the Map classes are not part of the JCF (Java Collections Framework). For each language, provide ...

Part a specification - robot simulationpart a

PART A Specification - Robot Simulation PART A Requirements To complete this assignment you will use the supplied eclipse project Robot P1/. It is already set up to execute a simple arm movement loop which you will build ...

Project requirementsfor the problem described in the next

Project requirements For the problem described in the next section, you must do the following: 1. include your student ID at the end of all filenames for all java code files. Three classes have been identified in section ...

Assessment instructionsin this assessment you will design

Assessment Instructions In this assessment, you will design and code a simple Java application that defines a class, instantiate the class into a number of objects, and prints out the attributes of these objects in a spe ...

Object-oriented software development1 introduction 11

OBJECT-ORIENTED SOFTWARE DEVELOPMENT 1. Introduction 1.1 Assignment Requirement 1.2 Deliverables and Structure (what to submit) 1.3 Software Restrictions 1.4 How to score high... 1.5 Assumptions 2. System Requirements 2. ...

Simple order processing systemquestion given the classes

Simple Order Processing System Question: Given the classes Ship (with getter and setter), Speedboat, and SpeedboatTest. Answer the following questions: Refine the whole application (all classes) and create Abstract class ...

Project descriptionwrite a java program to traverse a

Project Description: Write a java program to traverse a directory structure (DirWalker.java) of csv files that contain csv files with customer info. A simple sample in provided in with the sample code but you MUST will r ...

Assessment database and multithread programmingtasktask 1

Assessment: Database and Multithread Programming Task Task 1: Grade Processing University grading system maintains a database called "GradeProcessing" that contains number of tables to store, retrieve and manipulate stud ...

  • 4,153,160 Questions Asked
  • 13,132 Experts
  • 2,558,936 Questions Answered

Ask Experts for help!!

Looking for Assignment Help?

Start excelling in your Courses, Get help with Assignment

Write us your full requirement for evaluation and you will receive response within 20 minutes turnaround time.

Ask Now Help with Problems, Get a Best Answer

Why might a bank avoid the use of interest rate swaps even

Why might a bank avoid the use of interest rate swaps, even when the institution is exposed to significant interest rate

Describe the difference between zero coupon bonds and

Describe the difference between zero coupon bonds and coupon bonds. Under what conditions will a coupon bond sell at a p

Compute the present value of an annuity of 880 per year

Compute the present value of an annuity of $ 880 per year for 16 years, given a discount rate of 6 percent per annum. As

Compute the present value of an 1150 payment made in ten

Compute the present value of an $1,150 payment made in ten years when the discount rate is 12 percent. (Do not round int

Compute the present value of an annuity of 699 per year

Compute the present value of an annuity of $ 699 per year for 19 years, given a discount rate of 6 percent per annum. As