Question: In java : Create a class Employee that includes: o three instance variables a name ( type String ) , hire _ date ( type
In java :
Create a class Employee that includes:
o three instance variablesa name type String hiredate type Date and a monthly
salary type double
o A constructor that initializes the three instance variables.
o Public methods:
Provide a set and a get method for each instance variable. If the monthly salary
is not positive, do not set its value.
getEmployeeInfo: returns a string contains the employee name hire date and
hisher monthly salary
Write a test application named EmployeeTest, in which:
o define an ArrayList of type Employee
o create the following menu:
Add new employee: in this case you have to read the required attributes for an
employee, create a new Employee object, then add the created object to the
array list.
Remove an employee by hisher name if exists: in this case you have to read
the employee name to be deleted then remove himher from the array list.
Print annual salary for each employee: in this case you have to print each
employee name along with hisher calculated annual salary.
Add a certain raise percentage to each employees monthly salary: in this case
you have to read a double value which represents the percentage to be added
to each employee monthly salary, and add it to each employee.
Print all employees information: in this case you have to print all the attributes
for each employee.
Exit: this case exits from the program hint: use System.exit;
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
