Question: JAVA OOP name -Sid Id - 20 Problem#3 Create an Employee Record System for UAP HR department. For simplicity we will work with one employee
JAVA OOP
name -Sid
Id - 20
Problem#3 Create an Employee Record System for "UAP HR" department. For simplicity we will work with one employee today. Each Employee is identified by his/her name, employee id and position/designation. Each employee is paid a fixed monthly salary regardless of the number of hours he/she worked. The System should be able to check the salary of an employee, update the salary and view the employee info. What you need to do: 3) Create an Employee class which has 4 instance variables; name, id, designation and salary. a. Create a constructor that takes initial value for those 4 attributes and initializes those attributes. Create the following 4 methods as described e. void update Salary(double newSal) Inside the method the salary attributes need to be set to this newSal. f. double getSalary() The method returns the salary. g. void display() This method displays the attributes in the format "Name:[name]; Id:[id]; Designation:[designation); Salary: [salary)
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
