Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merge main with C3SC-59 #10

Merged
merged 2 commits into from
Nov 29, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
33 changes: 33 additions & 0 deletions Member.java
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}";
}
}
Loading