Skip to content

Latest commit

 

History

History
executable file
·
25 lines (21 loc) · 441 Bytes

File metadata and controls

executable file
·
25 lines (21 loc) · 441 Bytes

class Emploee
{
  private String name;
  private double salary;
  private LocalDate hireDate;
  
  public Emploee(String n, double s, int year, int month, iny day) {
    name = n;
    salary = s;
    hireDate = LocalDate.of(year, month, day);
  }
  
  public String getName() {
    return name;
  }
}

类之间,最常见的关系有

  • 依赖 (uses-a)
  • 聚合 (has-a)
  • 继承 (is-a)