Maju Enterprise is a new company launched in 2020. The company is in process of hiring new employee to help with their business operation. Once the person is hired, the information will be recorded such as name, ientity card, address, assignation and salary. Appropriate employee ID will be assigned to the employee once it is recorded.
Write the encapsulation process by using the class diagram.
public class Employee {
String name;
String address;
String assignation;
int id;
int salary;
public Employee(String name, String address, String assignation, int id, int salary) {
this.name = name;
this.address = address;
this.assignation = assignation;
this.id = id;
this.salary = salary;
}
public void setName(String name) {
this.name = name;
}
public String getAddress() {
return address;
}
public String getAssignation() {
return assignation;
}
}