4 Minute Quiz #7
- Write your name on a blank piece of paper.
- Write a simple Java class definition for a class smartPoint,
which extends the class myPoint from today's lecture.
In addition to the x and y
coordinates and the shape and color, the smartPoint also retains
an integer value, which acts as some sort of id number for the point.
- Write a simple constructor for smartPoint, which initializes
all its class variables with values provided as parameters to the
method.
- Override the method equals from the class Point, so
that it tests equality of the x and y coordinates, as well as of
the id number of a point.