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 void
printCourseDetails(Course course)
Prints the full details of a course.static void
printCourseList(CourseStatus status)
Prints a list of courses based on theCourseStatus
fromDatabase
.static void
printCourseList(CourseStatus status, Student student)
Prints a list of courses based on theCourseStatus
from aStudent
's courses.static void
printIndexList(Course course, boolean printVacancies)
Prints a list ofCourseIndex
for a particularCourse
with the option to print the number of vacanices.static void
printLesson(CourseIndex index)
Prints a list ofLesson
for a givenCourseIndex
.static void
printLesson(Lesson lesson)
Prints a lesson information for a givenLesson
.private static void
printLine()
Prints a horizontal line across the screen.static void
printStudentListByCourse(Course course, boolean sorted)
Prints a list of students in a givenCourse
with the option to have the list sorted.static void
printStudentListByIndex(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 theCourseStatus
fromDatabase
.- Parameters:
status
- The desired CourseStatus.
-
printCourseList
Prints a list of courses based on theCourseStatus
from 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 ofCourseIndex
for a particularCourse
with 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 ofLesson
for 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 givenCourse
with 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.
-