Hey guys, I'm fairly new to Java and I was wondering if I can get a hand with something.
My teacher gave me this instructions and I was supposed to pass this activity it right now.
Any help will be much appreciated. Thanks guys!
Quadrilaterals can be a Parallelogram, Square, Rectangle, Trapezoid and Rhombus. Area and perimeter can computed from all quadrilaterals.
Create and program the inheritance tree of the shapes given above. Make sure that common attributes and methods are declared in the super class.
Create a public test class that instantiates all sub classes of Quadrilateral. Demonstrate the use of each object by setting necessary attributes in order for you to compute area and perimeter. In the test class, create a method called showDetails() that accepts a Quadrilateral reference. This method should show the area and perimeter and other specific information of the instance passed thru the argument.
ONLY USE ONE JAVA FILE and name it LE6_Surname.java.
Please explain us how far you've come, and what specifically you need help with.
You'll have to create a class Quadrilateral, and subclasses for the specific kinds of shapes, as the assignment says. Did you manage to do that?
Since you'll have to put everything in one source file named LE6_Watson.java, you'll have to create a public class named LE6_Watson in that file - that will be the public test class that the assignment mentions. It will have to have a public static void main(String args) method, and a showDetails() method as the assignment explains.