Question paper (build 07.05.20.19)
1. Test getMaker()
2. Test setPrice()
Enter TC (1 or 2): 1
OUTPUT:
francecakE
1. Test getMaker()
2. Test setPrice()
Enter TC (1 or 2): 2
Enter new price: 15
OUTPUT:
15
Ok
Question 2:
(3 marks) Write a class Coffee and a class SpecCoffee extending from Coffee (i.c. Coffee is a superclass
and SpecCoffee is a subclass) with the following information:
Coffee
2 of 2
Paper No: 6
Where:
getName():String - return name.