mu_xin_g 2022-07-14 17:48 采纳率: 83.3%
浏览 41
已结题

关于#类图#的问题,如何解决?(语言-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

这个类图对不对.

  • 写回答

1条回答 默认 最新

  • Binary_10010 2022-07-14 17:58
    关注
    
    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;
        }
    }
    
    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论

报告相同问题?

问题事件

  • 系统已结题 7月22日
  • 已采纳回答 7月14日
  • 创建了问题 7月14日

悬赏问题

  • ¥100 支付宝网页转账系统不识别账号
  • ¥15 基于单片机的靶位控制系统
  • ¥15 AT89C51控制8位八段数码管显示时钟。
  • ¥15 真我手机蓝牙传输进度消息被关闭了,怎么打开?(关键词-消息通知)
  • ¥15 下图接收小电路,谁知道原理
  • ¥15 装 pytorch 的时候出了好多问题,遇到这种情况怎么处理?
  • ¥20 IOS游览器某宝手机网页版自动立即购买JavaScript脚本
  • ¥15 手机接入宽带网线,如何释放宽带全部速度
  • ¥30 关于#r语言#的问题:如何对R语言中mfgarch包中构建的garch-midas模型进行样本内长期波动率预测和样本外长期波动率预测
  • ¥15 ETLCloud 处理json多层级问题