- Create an applet with two parameters passed in the applet tag.
The first parameter indicates the numeric type (integer or floating
point) of the second parameter value.
Using the first parameter as a flag to choose which one of two
overloaded methods in a Test
class object to pass the second parameter as an argument. Print
out a message indicating which method was selected.
- Create a class heirarchy for some family of interest, such as
bird, particle, or automobile. Build subclasses that represent
specific types on an abstract base class.
For example,a Fruit
class would provide the base for several subclass fruit types
such as apples, oranges, pears, etc. Include methods in Fruit
that provide properties of the fruit such as the color (e.g. String
getColor()) , shape, average weight, etc. The subclasses
will override these methods to provide the properties unique to
a particular fruit. For one of the classes, e.g. pear, create
subclasses for particular types, such as Bartlet and Anjou pears.
In the main()
routine, create instances of the different classes and invoke
methods that print out the property values such as color, shape,