Class ReportService

java.lang.Object
org.codewithmagret.rest.report.ReportService

@Service public class ReportService extends Object
Service class for handling business logic related to reports.
  • Constructor Details

    • ReportService

      public ReportService()
  • Method Details

    • getCoursesPerCategory

      public List<CoursesByCategory> getCoursesPerCategory()
      Retrieves a list of courses grouped by their categories. Question 1: What courses are offered in each category?
      Returns:
      a list of courses grouped by category
    • getCoursesPerStudent

      public List<CoursesByStudent> getCoursesPerStudent()
      Retrieves a list of courses grouped by students. Question 2: What courses has each student enrolled in?
      Returns:
      a list of courses grouped by student
    • getInstructorPerCourse

      public List<InstructorByCourse> getInstructorPerCourse()
      Retrieves courses along with their assigned instructors. Question 3: What instructor teaches each course?
      Returns:
      a list of courses with their instructors
    • instructorsByStudent

      public List<InstructorsByStudent> instructorsByStudent()
      Retrieves a list of instructors associated with each student. Question 4: What instructors has each student learned from?
      Returns:
      a list of students with their associated instructors