☑Kizspy.me
Enter TC(1/2/3):1
Enter TC(1/2/3):2
Enter TC(1/2/3):3
OUTPUT:
OUTPUT:
001, Hoang, 12000.00
14900.00
OUTPUT:
001, Hoang, 500.00, 3, 18500.00
Question 3:
(2 marks)
Write a class named Employee with the following information:
Employee
-employeeld: int
-employeeName: String
-employeeSalary: double
-yearsOfExperience: int
+Employee(employeeld: int,
employeeName: String, employeeSalary:
double, yearsOfExperience:int)
+Getters & Setters
+toString(): String
Where:
•
Employee(employeeld: int, employeeName:
String, employeeSalary: double,
yearsOfExperience: int): - parameterized
constructor which sets values to the
employeeld, employee Name, employeeSalary,
and the yearsOfExperience.
Getters & Setters: write the setters and getters
of all the fields
.toString(): String - returns a string format that
contains all the information of the Employee:
employeeld-employeeName-employeeSalary-
yearsOfExperience. The employeeSalary is
formatted with two decimal place.
Write a class EmployeeList which extends from ArrayList (ArrayList is a collection) with the following
information:
EmployeeList
Where:
Zoom
+100%
Close