-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathUATA.java
More file actions
57 lines (45 loc) · 1.19 KB
/
Copy pathUATA.java
File metadata and controls
57 lines (45 loc) · 1.19 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
package org.example.comp360project2;
public class UATA extends Student {
private int max_hours = 10;
private int labHours;
private double pay = 20.0;
//object
public UATA(String lastName, String firstName, String address, int ID ){
super(lastName,firstName,address,ID);
this.labHours =max_hours ;
}
//calculate monthly
@Override
public double calculateMonthlyPay(){
return ( labHours ) * 4;
}
//calculate nine month
@Override
public double nineMonthlyPay(){
return (( labHours ) * 4 )* 9;
}
//getter and setters
public int getMax_hours() {
return max_hours;
}
public void setMax_hours(int max_hours) {
this.max_hours = max_hours;
}
public int getLabHours() {
return labHours;
}
public void setLabHours(int labHours) {
this.labHours = labHours;
}
public double getPay() {
return pay;
}
public void setPay(double pay) {
this.pay = pay;
}
//toString
@Override
public String getStudentInfo() {
return super.getStudentInfo() + "\nStudent Type: UTA\nLab Hours per Week: " + labHours + "\nMonthly Payment: $";
}
}