Loading
Home › Computer Science Help › Fairly short java program using multiple simple classes a...
Status: Completed

Fairly short java program using multiple simple classes and an interactive driver class. You will need to know how to write classes with constructors, setter and getters, toString methods and be familiar with concepts like inheritance and proper program syntax.

Date Posted: 26/09/2015
Category: Computer Science
Due Date: 30/09/2015
Instruction
Fairly short java program using multiple simple classes and an interactive driver class. You will need to know how to write classes with constructors, setter and getters, toString methods and be familiar with concepts like inheritance and proper program syntax.

User_7084 added on 09/28/15 at 06:53 AM (PST):

Produce a set of classes to represent shapes.

Produce five classes:

PolyShape: This class represents polygons with an instance data variable int[] sideLengths. This class should have a method getPerimeter() that takes no parameters and returns an integer.

Quadrilateral: This class represents polygons with four sides.

Rectangle: This class should have a method getArea() that takes no parameters and retuns an int.

Square:

Triangle: This class represents polygons with three sides. This class should have methods isIsoceles and is Equilateral that returns a boolean if two or three (respectively) sides are of equal length.

In each class include: one or more constructors, setters and getters, a toString method that returns the number of sides, the side lengths and all possible names for a shape. For example, a square might print "I have four sides of length 3, 3, 3, and 3. I am a polygon. I am a rectangle. I am a square."

When designing your classes, consider the following: Think about what the parent-shild relationship should be between these classes. Think about what information should be sent as parameters and what information can be hard-coded (using constants) into a class. Move common code as high up in the hierarchy as possible. Use super whenever possible. Follow appropriate naming and style conventions. Follow good principals of object-oriented design and inheritance.

Write an interactive driver program: The program allows the user to repeatedly create a shape by entering its dimensions. Note: you do not need to handle negative or decimal values in the driver program. You can assume the user will enter positive integer input only. The program prints the object created and the perimeter, area(if applicable), and isIsoceles/isEquilateral(if applicable) methods. Your classes should work with your driver program but they should be designed to work with other drivers too(Think carefully about what kind of checks should go into the driver program and what kind of checks should go into the individual classes. Remember that the object-oriented design states that each object should be in charge of its own information.)

Bonus Functionality (only do this if you want to)
Print out a text based graphic of the shape created when the user creates a square or a rectangle. For example a 4x5 rectangle might print:
*****
* *
* *
*****


Comment major functions of code
Attached
No File uploaded yet.
Bidders
ExcellentTutor 11 years ago
Rated 9.09 earned 174531.76 around 5422 assignments.
i can complete this assignment for you...thank you
$50.00
  • {$ item.message_content $}
    {$ item.sender_username $} | {$ item.date_entered $}
 
 
smasakari 11 years ago
Rated 9.17 earned 25004.00 around 1007 assignments.
hi
$100.00
  • i have excellent skills in java programming and ready to help you
    User_5293 | Sep 26, 2015, 19:33 PM
  • {$ item.message_content $}
    {$ item.sender_username $} | {$ item.date_entered $}
 
 
naveen2027 11 years ago
Rated 10.0 earned 385.00 around 12 assignments.
Can you post the questions?
$50.00
  • {$ item.message_content $}
    {$ item.sender_username $} | {$ item.date_entered $}
 
 
Essaymasters 11 years ago
Rated 8.94 earned 80799.14 around 2500 assignments.
Hi, I will assist you complete this assignment...thanks
$50.00
  • Please try to finish the java program by 6pm PST on Wednesday.
    User_7084 | Sep 28, 2015, 06:56 AM
  • Hi, I decided to finish for you early check it and release the funds for me.......thanks
    Essaymasters | Sep 29, 2015, 12:13 PM
  • {$ item.message_content $}
    {$ item.sender_username $} | {$ item.date_entered $}
 
 
accountspro 11 years ago
Rated 9.03 earned 41229.00 around 1104 assignments.
Hi, I can complete this assignment for you. I guarantee excellent results. Thank you
$50.00
  • {$ item.message_content $}
    {$ item.sender_username $} | {$ item.date_entered $}
 
 
bryan 11 years ago
Rated 8.54 earned 8526.70 around 280 assignments.
hi I'm a competent writer who sticks to what the client wants. i will deliver a quality paper plagiarism free. I'm dedicated to give a paper that my client will be assured of grade A. you will get the paper timely and quality assured.
$100.00
  • {$ item.message_content $}
    {$ item.sender_username $} | {$ item.date_entered $}
 
 
DAWPLTD 11 years ago
Rated 7.0 earned 320.00 around 10 assignments.
Will act as a regular tutor for u providing best tutorials for cheap and will help u get A in the coursework I will provide quality work to award you excellent grade. The assignment send will be original and fresh. It is my guarantee. Waiting for reply. Thanks I WILL provide quality work
$50.00
  • {$ item.message_content $}
    {$ item.sender_username $} | {$ item.date_entered $}
 
 
souravdas 11 years ago

I can solve this problem ver Easily and can get you 100% score. Price Negotiable.
$40.00
  • {$ item.message_content $}
    {$ item.sender_username $} | {$ item.date_entered $}