☑Kizspy.me
and: string, price. Int, quantity: Int
+getTotalValue(): int
+ printInfo(): void
Hints:
printInfo():void
Print all the information of the
Laptop: id, model, brand, price, quantity.
- We can use the to_string() in the string library to convert int to string
Notes:
- You can create new function(s) if you see it is necessary.
-Do not edit given statements in the main function.
Sample input and output:
Enter laptop id: A123
Enter laptop model: DV9000
Enter laptop brand: HPE
Enter price: 1400
Enter quantity: 2
1. Test printInfo()
2. Test getTotalValue()
Enter TC(1/2):1
Output for marking
OUTPUT:
A123,DV9000,HPE,1400,2
Enter laptop id: A123
Enter laptop model: DV9000
Enter laptop brand: HPE
Enter price: 1200
Enter quantity: 3
1. Test printInfo()
2. Test getTotalValue()
Enter TC(1/2):2
Output for marking
OUTPUT:
3600
Zoom
+ 100%
Activate Windows
Go to Settings to activate Windows.
Close