Rules of submission
This assignment must be submitted to the Moodle submission page for Homework 13 by 11:00 PM on Friday, 26 April.
Your submission must contain at least the five
Comparator classes that you are asked to complete below.
You may also submit in an enhanced
for use in future classes!
You can turn it your programs as separate files or in a ZIPped
Actually, you only have to complete a few
Start by unzipping a NetBeans project
into your NetBeansProjects directory.
Start up NetBeans and load the project.
The main application class is
PDriver, which is in the
class and looks quite a bit like a Processing application.
PDriver generates a bunch of random
Point1080 objects and then calls the
method of the Java collections framework to arrange these objects and
display them using the colors of the rainbow.
You can also use your mouse to add new
fill in the random holes.
The color arrangment is done by calling seven
classes that extend the
Two of those classes,
Your job is to complete the other five, which are listed below.
ComparatorVertical: Sort by the vertical position of the
ComparatorHorizontalReversed: Sort by the horizontal position of the
Point1080, but in the reverse order of
ComparatorHorizontalThenVertical: Sort first by the horizontal position of the
Point1080; and, if this results in a tie, sort by the vertical position of the
ComparatorAngle: Sort by the angle of the
ComparatorExciting: Sort in some way that gives an interesting pattern.