-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathPerson.java
48 lines (39 loc) · 1015 Bytes
/
Person.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
/*
* **********************************************
* San Francisco State University
* CSC 220 - Data Structures
* File Name: Person.java
* Author: Duc Ta
* Author: Bryan Khor
* **********************************************
*/
package CSC220ASMT2;
public sealed abstract class Person implements Greeting permits Student, Player, President, GeneralManager, Manager {
//
// Instance Data Fields
//
private String firstName;
private String lastName;
//
// Constructors
//
public Person() {
}
public Person(String firstName, String lastName) {
this.firstName = firstName;
this.lastName = lastName;
}
// Instance Methods
public String getFirstName() {
return firstName;
}
public void setFirstName(String firstName) {
this.firstName = firstName;
}
public String getLastName() {
return lastName;
}
public void setLastName(String lastName) {
this.lastName = lastName;
}
}