// approaches to the registrar class design practice problem for CS2102
// prepared by Brian Keeley-DeBonis

package worksheet;

// Registrar's Office: Tracking Student Grades

/*
Problem 1: The university registrar's office needs to track student grades in courses.
        Each student has a first name, last name, and id number and is taking three courses
        (assume we are tracking grades for only one term).  Students get a grade for each course;
        each course is identified by a department and a course number.
        The registrar will want to have a collection of
        all the students, so it can run computations on all the students and grades.*/


import java.util.LinkedList;


// Solution One (Weak)

class Student{
    String firstName;
    String lastName;
    int idNumber;

    // course 1
    int courseOneNumber;
    String courseOnedepartment;
    String courseOnegradeRecieved; // maybe one of "A", "B", "C", "NR", or "InProgress"

    // course 2
    int courseTwoNumber;
    String courseTwodepartment;
    String courseTwogradeRecieved;

    // course 3
    int courseThreeNumber;
    String courseThreedepartment;
    String courseThreegradeRecieved;
}

class RegistrarOffice{
    LinkedList<Student> students;
}


// Solution Two (Better)

class Student{
    String firstName;
    String lastName;
    int idNumber;

    Course course1;
    Course course2;
    Course course3;
}

class Course{
    int courseNumber;
    String department;
    String gradeRecieved;
}

class RegistrarOffice{
    LinkedList<Student> students;
}



// Solution 3, slightly more robust

class Student{
    Identification identification;
    Schedule schedule;
}

class Identification{
    String firstName;
    String lastName;
    int idNumber;
}

class Schedule{
    LinkedList<Course> courses;
}

class Course{
    String gradeRecieved;
    String department;
    int courseNumber;
}

class RegistrarOffice{
    LinkedList<Student> students;
}










