-
Notifications
You must be signed in to change notification settings - Fork 0
/
Department.java
91 lines (75 loc) · 2.22 KB
/
Department.java
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
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
// Definition of core class Department
// Author: Siomara Pantarotto
// File : Department.java
// Date : June,8,2000
import java.util.*;
public class Department {
private String rowId; // RowId
private int nbr; // Department id number
private String name; // Department name
private String code; // Department code
private double partyBudget; // Amount for parties
/////////////////////////////////////////////////////////////////////////
// Constructors
//
public Department() {
setDepartment("", 0, "", "", 0 );
}
public Department(Vector v) {
setDepartment( (String) v.elementAt(0),
Integer.parseInt((String) v.elementAt(1)),
(String) v.elementAt(2),
(String) v.elementAt(3),
Integer.parseInt((String) v.elementAt(4)));
}
public Department(String rowId, int nbr, String name, String code, double partyBudget) {
setDepartment(rowId,
nbr,
name,
code,
partyBudget);
}
////////////////////////////////////////////////////////////////////////
// Set methods
//
public void setDepartment(String rowId, int nbr, String name, String code, double partyBudget) {
setRowId(rowId);
setNbr(nbr);
setName(name);
setCode(code);
setPartyBudget(partyBudget);
}
public void setRowId(String rowId) {
this.rowId = rowId;
}
public void setNbr(int nbr) {
this.nbr = nbr;
}
public void setName(String name) {
this.name = name;
}
public void setCode(String code) {
this.code = code;
}
public void setPartyBudget(double partyBudget) {
this.partyBudget = partyBudget;
}
///////////////////////////////////////////////////////////////////////
// Get methods
//
public String getRowId() {
return rowId;
}
public int getNbr() {
return nbr;
}
public String getName() {
return name;
}
public String getCode() {
return code;
}
public double getPartyBudget() {
return partyBudget;
}
}