Class Main
java.lang.Object
Main
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic void
displayMenu(Tutor t)
This method prompts the tutor to choose to either view student info or student payment by inputting the respective number.static void
displayStudentInfo(Tutor tut, Scanner scan)
This method loops through all students the tutor is tutoring and prints their name, email, and party for payment.static void
This method prints the payment info of all students the tutor is currently tutoring.static void
static String
This method prompts the user to enter notes they would like to use for later reference.static String
sendInvoice(Student student, int number)
If a valid session number is provided by the tutor, the total fees for the particular session are calculated and returned as a string.static String
sendReminder(Student student)
This method uses the Student object provided as input to send a reminder to the student, which includes the student's name and the notes taken during the meeting.
-
Constructor Details
-
Main
Main()
-
-
Method Details
-
displayMenu
This method prompts the tutor to choose to either view student info or student payment by inputting the respective number. If the user inputs an invalid choice, the system rejects their choice and continues asking them until they input a valid number.- Parameters:
t
- the Tutor accessing the student info or payment
-
displayStudentInfo
This method loops through all students the tutor is tutoring and prints their name, email, and party for payment. Then, the system asks the tutor if they would like to send an email to remind a particular student for an upcoming meeting. If the input provided matches a valid student's name, the reminder is sent to the student. Otherwise, the system asks the tutor until a valid name is entered. If the tutor does not want to send an email, they are sent back to the display menu.- Parameters:
tut
- the Tutor accessing the student's infoscan
- a Scanner object used to receive input
-
displayStudentPayment
This method prints the payment info of all students the tutor is currently tutoring. Payment info includes the student's name, session date, session length, hourly rate of session, total amount owed by the student, and whether or not the student has paid the session fees. The system then prompts the tutor to provide input to choose to either send a reminder or invoice. If the tutor chooses to send an invoice and a valid student name and session number is provided, an invoice is sent to the student for the session. Otherwise, the tutor is sent back to the display menu. If the tutor chooses to send a reminder and provides a valid student name, a reminder is sent to the student. Otherwise, the tutor is prompted until it enters a valid name and then sent to the display menu afterwards. Preconditions: A valid Student object has been created and valid inputs for studentName and mySessions. A Session object has been created with valid inputs for sessionDate, sessionTime, sessionCost, hourlyRate. Postconditions: Displays information about the student�s payment status properly with content of:- Parameters:
t
- the Tutor accessing the student's payment info
-
sendReminder
This method uses the Student object provided as input to send a reminder to the student, which includes the student's name and the notes taken during the meeting. Preconditions: A valid Student object has been created with a valid input for studentName. Postconditions:Successfully fetched meeting notes and sent them to Student. Returns a toString value with the contents of the meeting notes (name and notesForMeeting)- Parameters:
studentName
- the student to which the tutor sends the reminder to- Returns:
- a string containing the student's name and notes taken during the meeting
-
sendInvoice
If a valid session number is provided by the tutor, the total fees for the particular session are calculated and returned as a string. Otherwise, an invalid session number error message is displayed. Preconditions: A valid Student object has been created with a valid input for studentName. Postconditions: returns a toString value with the contents of the invoice, (name and amountDue)- Parameters:
student
- the student to which the tutor is sending the invoice tonumber
- the session number that matches the session the tutor is sending the invoice for- Returns:
- a string containing invalid session number error message or invoice with fees due for session
-
makeMeetingNotes
This method prompts the user to enter notes they would like to use for later reference. The notes are stored by the system and returned. Preconditions: - A valid Student object has been created and has studentName declared and initialized to a string value. A Valid Tutor object has been created. Postconditions: returns a string value corresponding to the specified meeting notes.- Parameters:
s
- Scanner object used to store meeting notes- Returns:
- a string variable notes containing the meeting notes taken during meeting
-
main
-