Assigned: 02/23
Due: 03/02
NO CREDIT: 03/16
Then define a new class named Triangle, which extends the abstract class GeometricObject. As minimal specifications for your Triangle class, include at least one constructor that allows a user to specify the three vertices in pixel coordinates. Then define suitable instance variables that let you properly implement the abstract methods in GeometricObject. If you like challenges you can also include some of the methods described in Programming Exercise 10.13, but these are definitely optional.
Finally, write a test main() method (either in your Triangle class itself, or in a separate Main class) that creates at least two Triangle objects and exercises all their methods.
| 202.001 Home Page | Homework | Lab Projects | Exams | Demo Projects |