Starting from:

$10

Below is the beginning of a Java class

Below is the beginning of a Java class.


a) Complete this class so that:



i. The instance variables receive values when an object of the class is created.



ii. The class has methods to both access and change all instance variables individually.



iii. The toString method is overridden.







b) Write a single sub-class of the Implement class that includes at least the following:



i. The addition of a single piece of data unique to the sub-class.



ii. Methods to access and return this data.



iii. A call to the super-class’s constructor.







c) Create an array of objects of the sub-class.



i. Add two objects to the array



ii. Loop through the array and print what each element is constructed from.

More products