Skip to content

Commit

Permalink
Created guest class
Browse files Browse the repository at this point in the history
  • 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.
35 changes: 35 additions & 0 deletions Guest.java
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}";
}
}

0 comments on commit 3df2806

Please sign in to comment.