Enter id: 1
Enter salary:500
Enter salary:2000
Enter benefits:200
Enter benefits:500
1. Test get Gross Salary()
1. Test get GrossSalary()
2. Test toString()
2. Test toString()
Enter TC(1/2):1
Enter TC(1/2):2
OUTPUT:
OUTPUT:
1200
Enter id: 1
1, 2000, 500, 2500
Question 3:
(2 marks)
Write a class named Product with the following information:
Product
Where:
- id: int
Product()-default constructor
name:String
- price: double
Zoom
+ 100%
Close