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.

[1663 byte] By [daniellesa] at [2007-11-27 2:50:49]
# 1
please don't flood the boards
georgemca at 2007-7-12 3:23:30 > top of Java-index,Java Essentials,Java Programming...
# 2
can you help?
daniellesa at 2007-7-12 3:23:30 > top of Java-index,Java Essentials,Java Programming...
# 3
> can you help?see my reply in Exam prep (1)
georgemca at 2007-7-12 3:23:30 > top of Java-index,Java Essentials,Java Programming...
# 4
Very few people will help you when you have shown little or no work on your own. What has you stuck? What do you think the answer (to one question at a time) would be? Then, maybe, we can point you in the right direction.- Saish
Saisha at 2007-7-12 3:23:31 > top of Java-index,Java Essentials,Java Programming...
# 5
Continue-posted (probably not a real term, but oh well). http://forum.java.sun.com/thread.jspa?threadID=5167048&tstart=0- Saish
Saisha at 2007-7-12 3:23:31 > top of Java-index,Java Essentials,Java Programming...