Define the following classes to manage registration of students to courses at a university,

a) The lectures of each course is twice a week, lectures start on the hour and their duration is 50 min. For example lecture schedule of a course may be Monday 14:00, Wednesday 14:00. Two lectures are at the same time. Define a class LectureTime that has three data members,

  • The first day of a lecture as a standard library string
  • The second day of a lecture as a standard library function
  • The start hour of a lecture as an integer.

b) Define a class Course with the following data members,

  • course Number as a standard library string. // example: "COEN 244"
  • courseName as a standard library string. // example: "Programming"
  • an object of Lecture Time as a data member.
  • Number of credits of a course, a course credit may be 1..4 credits.

c) A student is allowed to take a maximum of 6 courses during a semester and total number of credits should not exceed 15 credits. Define a Student class with the following data members,

  • studentName as a standard library string.
  • studentId as an integer
  • Number of credits that student has been registered.
  • a pointer array of six Course objects (this array should be initialized to null values)

A student is not allowed to register courses that their lecture times overlap. For example a course with lecture times M, W, 14:00 and a course with lecture times W, F, 14:00 overlaps with each other.

d) Define a class CourseRegistration with the following data members,

  • An object of Course class
  • Maximum number of students that may be registered to the course
  • Number of students currently registered to the course.
  • A pointer array of Student objects of the size of maximum number of students that may be registered to the course (this array should be initialized to null values).

e) Define class dataManager to manage registration of the students to the courses. Maximum number of courses that may be offered during a semester is 100 and maximum number of students at the university is 2,000. This class has the following data members,

  • A data member called courseArray which is a pointer array of Course Registration objects of size 100 (this array should be initialized to null values).
  • A data member called studentArray which is a pointer array of Student objects of size 2,000. This array should be initialized to null values.

This class should provide at least the following member functions with given function prototypes,

  • Insert function to add a new CourseRegistration object to the courseArray.
    • bool insertCourseRegistration( CourseRegistration *)
  • Insert function to add a new Student object to the studentArray.
    • bool insertStudent(Student *);
  • Delete function to remove a Student object from the studentArray by inserting a null value at that position.
    • bool delete(Student *);
  • A function to register a student to a course. A student will be registered to a course if it meets all the conditions.
    • bool registering_to_Course(Student *, Course &);
  • A function that enables dropping of a course by a student.
    • bool dropping_a_Course(Student *, Course &);
  • A function that returns number of students registered to a course.
    • int course Enrollment (Course &);
  • A function that receives a student id and displays the courses that this student has been registered with total number of credits.
    • void studentCourses(int);
  • A function that displays information for all the courses to be offered by the university during a semester.
    • void print();

f) Write a driver program that demonstrates functionality of your program.

  • Creates an object of dataManager class.
  • Creates Course, CourseRegistration and Student objects and insert them to their arrays.
  • Give examples of registration of students to the courses and dropping of courses.

Key Considerations for the assignment:

  • The quality of your software will also be evaluated.
  • You must enforce encapsulation by keeping all data members private.
  • You need to make sure that your classes are well defined using the various concepts seen in the class.
  • Each class should have at least one constructor function that initializes its data members.
  • Provide needed set/get functions for the data members.
  • In the implementation of the member functions all the changed data structures should be updated.
  • Objects should be created dynamically and must be deleted when no longer needed. There should be an output statement confirming the deletion of an object from the destructor function.
Academic Honesty!
It is not our intention to break the school's academic policy. Posted solutions are meant to be used as a reference and should not be submitted as is. We are not held liable for any misuse of the solutions. Please see the frequently asked questions page for further questions and inquiries.
Kindly complete the form. Please provide a valid email address and we will get back to you within 24 hours. Payment is through PayPal, Buy me a Coffee or Cryptocurrency. We are a nonprofit organization however we need funds to keep this organization operating and to be able to complete our research and development projects.