-
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
Showing
1 changed file
with
33 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,33 @@ | ||
import java.time.LocalDate; | ||
|
||
public class Member extends Person { | ||
|
||
public Long id_number; | ||
public LocalDate creation_date; | ||
public LocalDate expiration_date; | ||
public LocalDate last_checked_in; | ||
|
||
public Member(){super();} | ||
public Member(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 setCreationDate(LocalDate date) {creation_date = date;} | ||
public void updateLastCheckedIn() {last_checked_in = LocalDate.now();} | ||
public void updateExpirationDate(LocalDate date) {expiration_date = date;} | ||
|
||
public long getIDNumber() {return id_number;} | ||
public LocalDate getCreationDate(){return creation_date;} | ||
public LocalDate getExpirationDate(){return expiration_date;} | ||
public LocalDate getLastCheckedInDate(){return last_checked_in;} | ||
|
||
public String toString(){ | ||
return "MEMBER: " + getName() + " -> {\n\t" | ||
+ "Id Number: " + id_number + "\n\t" | ||
+ "Membership Created on: " + creation_date.toString() + "\n\t" | ||
+ "Membership Expires on: " + expiration_date.toString() + "\n\t" | ||
+ "Last Checked in on: " + last_checked_in.toString() + "\n\t" | ||
+ "Email: " + id_number + "\n}"; | ||
} | ||
} |