关于#类图#的问题,如何解决?(语言-java)

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 nameientity 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.

img

这个类图对不对.


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;
    }
}