Exam prep (2)
5.Write a method called drawCircl e that draws a circle based on the method's
parameters: a Graphics object through which to draw the circle, two integer
values representing the (x, y) coordinates of the centre of the circle, another integer
that represents the circle's radius, and a Colour object that defines the circle's colour~ The method does not retum anything..:
6.Overload the drawCircle method of the question 2 above such that if the Colour
parameter is not provided, the circle's colour will default to black.
7.Overload the dra wCi rcl e method of the question 2 above such that if the radius is
not provided, a random radius in the range 10 to 100 (inclusive) will be used.
8.The class Thought is the parent of the class Advice. Both the Thought class and the
Advice class contain a definition for a method called message. The version of message
defined in the Thought class is inherited by Advice, but Advice overrides it with an
alternative version. The new version of the method prints out an entirely different
message and then invokes the parent's version of the message method.
(i) Create the class Thought to print out the string "I feel like I'm diagonally parked
in a parallel universe."
(ii) Create the class Advice in which the method message is overriden to print out the
string "Warning: Dates in calendar are closer than they appear."
(iii) Create the class Messages in which main method is contained to instantiate two
objects: the method message from class Thought and the method message from
class Advice.

