Presentation is loading. Please wait.

Presentation is loading. Please wait.

Java course. Assignment #2, due: Feb. 27, 2004 1.(20) (a) Tell the difference between the abstract class and the interface. (b) Tell the difference between.

Similar presentations


Presentation on theme: "Java course. Assignment #2, due: Feb. 27, 2004 1.(20) (a) Tell the difference between the abstract class and the interface. (b) Tell the difference between."— Presentation transcript:

1 Java course. Assignment #2, due: Feb. 27, 2004 1.(20) (a) Tell the difference between the abstract class and the interface. (b) Tell the difference between the method overloading and the method overriding. (c) Using an example to specify what is "upcasting"? (d) Using an example to specify what is "polymorphism"? 2.(20) (a) Create your home page. (b) Write an applet that draws a rectangle. The dimensions of the applet should be 250  200 pixels. The rectangle should be centered in the applet and have a width and height of 200 and 150 pixels, respectively.

2 Java course. Assignment #2, due: Feb. 27 2004 3.(20) Draw an applet displaying 13 horizontal color bars that corresponds to the constants defined by the Color class provided by Java. 4.(20) Implement an "applet" which contains two parts: i) Lamp.html ii)Lamp.class

3 Java course. Assignment #2, due: Feb. 27, 2004 5.(20) Write a program which prompts for a date in the format dd/MM/yyyy and prints the date in the form Month day, Year. For example, 17/05/2001 should print May 17, 2001. (Use the switch statement.) Your program should verify that the day is between 1 and 31, the month is between 1 and 12, and the year is between 1000 and 3000. Generate errors messages if the input is invalid. Test your program on the following inputs: 17/05/2001 00/00/0000 05/12/1999 Note: You do not have to handle cases where a month has only 28, 29, or 30 days.


Download ppt "Java course. Assignment #2, due: Feb. 27, 2004 1.(20) (a) Tell the difference between the abstract class and the interface. (b) Tell the difference between."

Similar presentations


Ads by Google