forked from Denisolt/CSCI-160
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathPayRollClass2.java
More file actions
68 lines (61 loc) · 1.5 KB
/
PayRollClass2.java
File metadata and controls
68 lines (61 loc) · 1.5 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
58
59
60
61
62
63
64
65
66
67
68
/*
* 03/12/2016
___________________________________________
+ PayrollClass +
+_________________________________________+
+ -String:Name +
+ -int:ID +
+ -int: hp +
+ -double: numofhours +
+_________________________________________+
+ +PayRollClass(String:name, int:ID):void +
+ +setHourlyPay(double:hourpay):void +
+ +getHourlyPay():double +
+ +setRate(int:numofh):void +
+ +getRate():int +
+ +getNate():String +
+ +getID():int +
+ +GrossPay():double +
___________________________________________
*/
public class PayRollClass2
{
private String Name;
private int ID;
private double hp;
private int numofhours;
public PayRollClass2(String name, int id)
{
ID = id;
Name = name;
}
public void setHourlyPay(double hourpay)
{
hp = hourpay;
}
public double getHourlyPay()
{
return hp;
}
public void setRate(int numofh)
{
numofhours = numofh;
}
public int getRate()
{
return numofhours;
}
public String getname()
{
return Name;
}
public int getID()
{
return ID;
}
public double GrossPay()
{
double grossPay = hp*(double)numofhours;
return grossPay;
}
}