package inheritance7;
public class PartTime extends Employee {
private int time, pay;
public PartTime() {}
public PartTime(String name, int time, int pay) {
// super(name);
super.setName(name);
this.time = time;
this.pay = pay;
}
public int getSalary() {
return this.time * this.pay;
}
}
'Class > 220729' 카테고리의 다른 글
Class 예제(1) (0) | 2022.07.31 |
---|---|
Class(2-4) (0) | 2022.07.31 |
Class(2-2) (0) | 2022.07.31 |
Class(2-1) (0) | 2022.07.31 |
Class(1-5) (0) | 2022.07.31 |