-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Xander Estevez
authored and
Xander Estevez
committed
Dec 2, 2024
1 parent
467fd29
commit 3df2806
Showing
1 changed file
with
35 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
import java.time.LocalDate; | ||
public class Guest extends Person { | ||
|
||
public long id_number; | ||
public Status guest_status; | ||
public String password; | ||
|
||
public Guest(){ | ||
super(); | ||
} | ||
public Guest(String firstName, String lastName, String emailAddress, LocalDate birthDate, long phoneNumber) { | ||
super(firstName, lastName, emailAddress, birthDate, phoneNumber); | ||
} | ||
|
||
public void setIdNumber(long number) {id_number = number;} | ||
public void setPassword(String p) {password = p;} | ||
public void setEnum(Status s) {guest_status = s;} | ||
public boolean setEnum(String s) { | ||
try{ | ||
guest_status = Status.valueOf(s); | ||
}catch (Exception e) { | ||
return false; | ||
} | ||
return true; | ||
} | ||
|
||
public long getIDNumber() {return id_number;} | ||
public Status getStatus() {return guest_status;} | ||
|
||
public String toString(){ | ||
return guest_status + ": " + getName() + " -> {\n\t" | ||
+ "ID Number: " + id_number + "\n\t" | ||
+ "Email Address: " + email_address + "\n}"; | ||
} | ||
} |