-
Notifications
You must be signed in to change notification settings - Fork 0
/
Employee.java
106 lines (87 loc) · 2.61 KB
/
Employee.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
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
// Definition of core class Employee
// Author: Siomara Pantarotto
// File : Employee.java
// Date : July,3,2000
import java.util.*;
public class Employee {
private String rowId; // RowId
private int id; // Employee id number
private String lastName; // Employee last name
private String firstName; // Employee first name
private String email; // Employee email
private double salary; // Employee salary
//////////////////////////////////////////////////////////////////////
// Constructors
//
public Employee() {
setEmployee("", 0, "", "", "", 0 );
}
public Employee(Vector v) {
setEmployee( (String) v.elementAt(0),
Integer.parseInt((String) v.elementAt(1)),
(String) v.elementAt(2),
(String) v.elementAt(3),
(String) v.elementAt(4),
Integer.parseInt((String) v.elementAt(5)));
}
public Employee(String rowId, int id, String lastName, String firstName,
String email, double partyBudget) {
setEmployee(rowId,
id,
lastName,
firstName,
email,
salary);
}
///////////////////////////////////////////////////////////////////////////
// Set methods
//
public void setEmployee(String rowId, int id, String lastName, String firstName,
String email, double salary) {
setRowId(rowId);
setId(id);
setLastName(lastName);
setFirstName(firstName);
setEmail(email);
setSalary(salary);
}
public void setRowId(String rowId) {
this.rowId = rowId;
}
public void setId(int id) {
this.id = id;
}
public void setLastName(String lastName) {
this.lastName = lastName;
}
public void setFirstName(String firstName) {
this.firstName = firstName;
}
public void setEmail(String email) {
this.email = email;
}
public void setSalary(double salary) {
this.salary = salary;
}
/////////////////////////////////////////////////////////////////////////
// Get methods
//
public String getRowId() {
return rowId;
}
public int getId() {
return id;
}
public String getLastName() {
return lastName;
}
public String getFirstName() {
return firstName;
}
public String getEmail() {
return email;
}
public double getSalary() {
return salary;
}
}