COEN 244 (Fall XXXXXXXXXXAssignment #2Deadline: October 11 by 11:59PMType: Group AssignmentWeight: This assignment is worth 6.25% of your final gradeIMPORTANT:- You must include the name and student...

1 answer below »
COEN 244 (Fall 2022) - Assignment #2
Deadline: October 11 by 11:59PM
Type: Group Assignment
Weight: This assignment is worth 6.25% of your final grade
IMPORTANT:
- You must include the name and student ID of both members of a group in each
file.
- Group members should be from the same section.
- For each class that you create you need to separate the specification of the class
from its implementation by using header files. Make sure that you submit with
your answer both the .h and .cpp files for each class.
- Compress the files using zip or other tools.
- Submit the zip file on Moodle, download or check the size of the submitted file to
make sure that submission has occurred.
- Donot wait the last minute to submit your assignment, because Moodle may be
overloaded and your submission may fail.
- Assignments sent by email willnot be corrected.
- No late submission policy under any circumstances.
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,
• courseNumber as a standard library string. // example: “COEN 244”
• courseName as a standard library string. // example: “Programming”
• an object of LectureTime 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 isnot 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
CourseRegistration 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 courseEnrollment ( 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.
Answered 2 days AfterOct 11, 2022

Answer To: COEN 244 (Fall XXXXXXXXXXAssignment #2Deadline: October 11 by 11:59PMType: Group AssignmentWeight:...

Ria answered on Oct 13 2022
63 Votes
SOLUTION.PDF

Answer To This Question Is Available To Download

Related Questions & Answers

More Questions »

Submit New Assignment

Copy and Paste Your Assignment Here