Package MySTARS
Class CourseManager
java.lang.Object
MySTARS.CourseManager
public final class CourseManager
extends java.lang.Object
CourseManager that prints information regarding courses in the correct format.
- Since:
- 2020-11-1
- Version:
- 1.0
- Author:
- Bhargav
-
Constructor Summary
Constructors Constructor Description CourseManager() -
Method Summary
Modifier and Type Method Description static voidprintCourseDetails(Course course)Prints the full details of a course.static voidprintCourseList(CourseStatus status)Prints a list of courses based on theCourseStatusfromDatabase.static voidprintCourseList(CourseStatus status, Student student)Prints a list of courses based on theCourseStatusfrom aStudent's courses.static voidprintIndexList(Course course, boolean printVacancies)Prints a list ofCourseIndexfor a particularCoursewith the option to print the number of vacanices.static voidprintLesson(CourseIndex index)Prints a list ofLessonfor a givenCourseIndex.static voidprintLesson(Lesson lesson)Prints a lesson information for a givenLesson.private static voidprintLine()Prints a horizontal line across the screen.static voidprintStudentListByCourse(Course course, boolean sorted)Prints a list of students in a givenCoursewith the option to have the list sorted.static voidprintStudentListByIndex(CourseIndex courseIndex, boolean sorted)Prints a list of students in a givenCourseIndex.
-
Constructor Details
-
CourseManager
public CourseManager()
-
-
Method Details
-
printCourseList
Prints a list of courses based on theCourseStatusfromDatabase.- Parameters:
status- The desired CourseStatus.
-
printCourseList
Prints a list of courses based on theCourseStatusfrom aStudent's courses.- Parameters:
status- The desired CourseStatus.student- The Student whose courses are to be printed.
-
printCourseDetails
Prints the full details of a course.- Parameters:
course- The course to be printed
-
printIndexList
Prints a list ofCourseIndexfor a particularCoursewith the option to print the number of vacanices.- Parameters:
course- The desired Course to print the values from.printVacancies- Indication to print the number of vacancies.
-
printLesson
Prints a list ofLessonfor a givenCourseIndex.- Parameters:
index- The CourseIndex whose Lessons need printing.
-
printLesson
Prints a lesson information for a givenLesson.- Parameters:
lesson- The Lesson that needs printing.
-
printStudentListByCourse
Prints a list of students in a givenCoursewith the option to have the list sorted.- Parameters:
course- The Course from which to print the list of Students.sorted- The option to sort the Students by name.
-
printStudentListByIndex
Prints a list of students in a givenCourseIndex.- Parameters:
courseIndex- The CourseIndex from which to print the list of Students.sorted- The option to sort the Students by name.
-
printLine
private static void printLine()Prints a horizontal line across the screen.
-