Class Student
java.lang.Object
Student
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiondouble
Returns the amount paid.getASessions(LocalDate date)
Returns the session at the given date.boolean
Returns if the student is finished paying.Returns the HashMap of sessionsReturns the party for paymentReturns the student's emailReturns the student's namevoid
setAmountPaid(double amount)
Sets amount payed.void
setFinishedPaying(boolean payed)
Sets if the student has finished paying.void
setMySessions(HashMap<LocalDate,Session> sessions)
Set the student's sessions to the given HashMap.void
setPartyForPayment(String payment)
Sets the party for payment.void
setStudentEmail(String email)
Sets the student's email.void
setStudentName(String name)
Sets the student's name.
-
Field Details
-
Constructor Details
-
Student
public Student(String studentName, String studentEmail, HashMap<LocalDate,Session> mySessions, double amountPaid, String partyForPayment, boolean finishedPaying)Initializes a new student with the given parameters. studentName must be a valid String. studentEmail must be a valid email. mySessions must be an initialized HashMapamountPaid must be a valid double in dollars. - Parameters:
studentName
- Name of the studentstudentEmail
- Email of the studentmySessions
- Session listamountPaid
- Amount paid in dollarspartyForPayment
- Party for paymentfinishedPaying
- If student is finished paying
-
-
Method Details
-
getStudentName
Returns the student's name- Returns:
- The student name
-
getStudentEmail
Returns the student's email- Returns:
- The student's email
-
getMySessions
Returns the HashMap of sessions- Returns:
- HashMap of sessions
-
getASessions
Returns the session at the given date. The date parameter must link to a valid session.- Parameters:
date
-- Returns:
- The session at the given date
-
getAmountPaid
public double getAmountPaid()Returns the amount paid.- Returns:
- The amount paid
-
getPartyForPayment
Returns the party for payment- Returns:
- the party for payment
-
getFinishedPaying
public boolean getFinishedPaying()Returns if the student is finished paying.- Returns:
- if the student is finished paying.
-
setStudentName
Sets the student's name.- Parameters:
name
-
-
setStudentEmail
Sets the student's email.- Parameters:
email
-
-
setMySessions
Set the student's sessions to the given HashMap. The sessions argument must be a valid HashMap. - Parameters:
sessions
- HashMap of sessions
-
setAmountPaid
public void setAmountPaid(double amount)Sets amount payed. The amount argument must be a valid double.- Parameters:
amount
- amount paid in dollars
-
setPartyForPayment
Sets the party for payment.- Parameters:
payment
-
-
setFinishedPaying
public void setFinishedPaying(boolean payed)Sets if the student has finished paying.- Parameters:
payed
- true if finished, false otherwise
-