Question: Mr. Hamza is working as an accountant in the Octal Company. He wants to calculate salary of his company employees. Develop a java program to calculate salary using the concept of abstract based on the following instructions. Save the project/file as AccountantYourID. A) Abstract Class name: YourFirstName_Octal Abstract Member Method: – to calculate and return salary salary() B) Class name: Employee extends YourFirstName_Octal Member variables: wage, noOfDays, bonus Member Method : – parameterized constructor to initialize member variables – to calculate and return salary salary = (wage3 * noOfDays) / 4 + bonus C) Controlling class : – To create an object of Employee – To print salary of the Employee – To print bonus of Employee
Question:
Mr. Hamza is working as an accountant in the Octal Company. He wants to calculate salary of his company employees. Develop a java program to calculate salary using the concept of abstract based on the following instructions. Save the project/file as AccountantYourID.
A) Abstract Class name: YourFirstName_Octal
Abstract Member Method:
– to calculate and return salary
salary()
B) Class name: Employee extends YourFirstName_Octal
Member variables: wage, noOfDays, bonus
Member Method :
– parameterized constructor to initialize member variables
– to calculate and return salary
salary = (wage3 * noOfDays) / 4 + bonus
C) Controlling class :
– To create an object of Employee
– To print salary of the Employee
– To print bonus of Employee
Step by step
Solved in 4 steps with 1 images