Lab Task
Salary Record
National Bank of Pakistan wants to computerize his salary record. The following attributes will be saved for each employee
Emp Id: an integer number
Emp Name: a String value
Emp Salary: a double value
Emp Grade: a String with three possible grades
i.e. Grade-I, Grade-II and Grade-III
Provide a menu driven interface with exit option in the main method. The minimum menu options comprises of the followings
1) Save a new Employee Record
2) Print Salary List of All Employees
3) Give Annual Increment to all Employees
4) Print Total Salary Amount
5) Exit
Write a function for each of the options in the menu. The relevant function must be called based on the option selected by the user. The software should not shut down until the user selects the exit option form the main menu.
Detail of Methods:
1. Constructor:
It should be used to initialize the instance variables.
2. Main Method:
It should be used to control the overall flow of the program. It should provide the main menu and call the appropriate function based on the user choice.
3. Save a new Employee Record
A new salary record of an employee will be entered whenever the operator will select this option from the main menu. This function will take input for all required fields and then make an object using the constructor written above. Assume that you have an array of Employee class and store new object at new index of this array.
4. Print Salary List of All Employees
Print the salary record of those employees only which were saved in the objects.
5. Give Annual Increment to all Employees
The annual increment criteria is
For All Grade-I Employees: 20% increment in existing salary
For All Grade-II Employees: 15% increment in existing salary
For All Grade-III Employees: 10% increment in existing salary
6. Print Total Salary Amount
This function will calculate and print the sum the salaries of all the employees in the bank.
7. Exit Method:
Shut down the current software.
Note: You can take any other extra methods or variables to complete this program according to the given requirements if you fell so.