Assigned Date: Monday, Oct. 3, 2005 (sec 2 +1 day)
Due Date: Thursday, Oct. 13, 2005 (sec 2 +1 day)
Due Time: Noon
Last modified on October 06, 2005, at 04:58 PM (see updates)
This assignment focuses on Java inheritance, polymorphism, abstract classes, and interfaces.
Shape class hierarchy to include a class for equilateral triangles and a class for isosceles triangles (i.e.,
Isosceles.java). For a review of such triangles, see triangle formulas. Rename the
Triangle class to
Scalene.java) and make it model scalene triangles – triangles with three, possibly unequal sides.
Shape class and its subclasses to implement the
Relation interface. The
Relation interface methods should compare the areas of individual shapes. (Note: There are several ways to do this. Look for the most elegant one.)
Write a test program (
TestShape.java) that creates a series of shapes and sorts the shapes into ascending order of size using the
Your code should be fully documented via javadoc. Test method preconditions, and throw
IllegalArgumentException when needed.
Include the following in each class:
Certification of Authenticity: I certify that this submission is entirely my own work, as per course collaboration policy. Name: ________________________ Date: ___________
.jarfile to firstname.lastname@example.org, by the due date and time.