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), hire_date (type Date) and a monthly
salary (type double).
o A constructor that initializes the three instance variables.
o Public methods:
1. Provide a set and a get method for each instance variable. If the monthly salary
is not positive, do not set its value.
2. getEmployeeInfo: returns a string contains the employee name , hire date and
his/her monthly salary
Write a test application named EmployeeTest, in which:
o define an ArrayList of type Employee
o create the following menu:
1. 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.
10
2. Remove an employee by his/her name if exists: in this case you have to read
the employee name to be deleted then remove him/her from the array list.
3. Print annual salary for each employee: in this case you have to print each
employee name along with his/her calculated annual salary.
4. 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.
5. Print all employees information: in this case you have to print all the attributes
for each employee.
6. Exit: this case exits from the program (hint: use System.exit(0);)

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Finance Questions!