+setQuantity(quantity:int):void
obtained by lowercase the first and last letters of the maker string.
getQuantity():int - return quantity.
setQuantity(quantity:int):void
quantity=new quantity.
update
Do not format the result.
The program output might look something like:
Enter maker: TofU
Enter maker: tofu
Enter quantity: 2
Enter quantity: 2
1. Test getMaker()
1. Test getMaker()
2. Test setQuantity()
2. Test setQuantity()
Enter TC (1 or 2): 1
Enter TC (1 or 2): 2
OUTPUT:
Enter new quantity: 10
tofu
OUTPUT:10
Question 2:
(3 marks) Write a class Speaker and a class SpecSpeaker extending from Speaker (i.e. Speaker is a superclass and SpecSpeaker is a subclass) with the following information:
Speaker
Where:
+ 100%
Zoom
Close