Fraser International College CMPT XXXXXXXXXXAssignment 3 Dr. Yonas T. Weldeselassie Page 1 CMPT 135 – FIC XXXXXXXXXXAssignment 3 Due Date and Time: Thursday 7 April 2022 at 11:55 PM PST Instructor:...

1 answer below »

Fraser International College CMPT XXXXXXXXXXAssignment 3 Dr. Yonas T. Weldeselassie Page 1

CMPT 135 – FIC XXXXXXXXXXAssignment 3
Due Date and Time: Thursday 7 April 2022 at 11:55 PM PST
Instructor: Dr. Yonas T. Weldeselassie (Ph.D.)
Introduction
In this assignment we will design a school management system in order to handle the typical operations of a
school administrative system. We will design the school management system using object oriented
programming paradigm that will also bo
ow ideas from relational databases in order to manage memory
efficiently. The purpose of the assignment is to apply everything we have learned in CMPT 135 into action in
one complete project.
Restrictions
In this assignment, you are NOT allowed to use any C++ STL li
ary. You will be given the necessary include
directives and namespaces in the starter code file provided together with this assignment; and you are NOT
allowed to add any include directive or namespace to the project. You are also required to use only the
programming methodologies discussed in the course; don't copy and paste some unnecessary complicated
C++ code fragments from the Internet. Last but not least, you are NOT allowed to change any class design,
member variable, or function signature from the code provided to you. You are also NOT allowed to add or
emove any member or friend function provided for the classes in the starter code file.
IDE
This assignment C++ project was developed and tested under Microsoft Visual C XXXXXXXXXXExpress. Your
submission will also be tested under the same IDE. Thus you are strongly advised to use the same IDE for your
work. Of course you may use any other IDE. However please make sure you don't have heap co
uption or
index out of bound e
ors which are very well caught in Microsoft Visual C XXXXXXXXXXExpress but not as good in
other IDEs. The test program will also use a fixed seed for the random number generator so that you will
generate the same random numbers as in the sample run output and get the same output on the same IDE.
Please note that the program output may not fit on your console output window and you may not be able to
see the whole output in your console output window. In this case, I advise you either you use
eak points (do
esearch about this) or insert system pause statements in the test main program in order to see partial
outputs at a time.
Asserting Conditions
In this assignment you will be asked to assert conditions in different parts of the project. In order to be able to
do so, you are provided the cassert include directive. Therefore you are required to use the assert
statement in order to test the validity of a specified condition and if the condition is not satisfied then the
assert statement should halt (stop) execution your program.
Submission
You are required to submit one source code file (that is .cpp file) that must contain all your class declarations
and definitions and the test main program. You must submit through Moodle before the due date and time.
No email submission will be accepted.
Fraser International College CMPT XXXXXXXXXXAssignment 3 Dr. Yonas T. Weldeselassie Page 2

Submission Due Date and Time
The due date and time to submit your work through Moodle is Thursday 7 April 2022 at 11:55PM PST.
Problem Statement: The School Management System (Database)
Our aim is to design a school management system as a database system where the system will enable us to
 Add a new course to the system,
 Remove a course from the system,
 Search for a specific course in the system;
 Register a new student to the system,
 Search for a specific student in the system,
 Remove a student from the system;
 Enroll a student to a course,
 Withdraw a student from a course,
 Assign a student a letter grade for a course,
 Compute a student's GPA,
 Compute the top student in the system;
 Print the information stored in the system, and
 Etc.
In order to guide you through the design process, we will build the system step by step as described below.
Step 1
You are given the declaration of a SmarterA
ay class template in the Starter Code text file. You are also
given the definition of its default constructor and overloaded output stream operator functions. Define all the
emaining member functions. The class declaration is heavily commented to help you understand what you
need to do.
It is your responsibility to test the co
ectness of your class definition. To do so, I advise you to write a small
test program that tests each member and friend functions of the class before you continue to the next section.
Step 2
You are given the declaration of a Map class template in the Starter Code text file. You are also given the
definition of its default constructor and overloaded output stream operator functions. Define all the remaining
member functions. The class declaration is heavily commented to help you understand what you need to do.
It is your responsibility to test the co
ectness of your class definition. To do so, I advise you to write a small
test program that tests each member and friend functions of the class before you continue to the next section.
Step 3
You are given the declaration of a Course class in the Starter Code text file. You are also given the definition of
its default constructor and overloaded output stream operator functions. Define all the remaining member
functions. Some comments are provided inside the class declaration to help you understand what you need to
do; although it should be fairly straight forward to understand the functionality of each member function and
thus straightforward to implement.
It is your responsibility to test the co
ectness of your class definition. To do so, I advise you to write a small
test program that tests each member and friend functions of the class before you continue to the next section.
Fraser International College CMPT XXXXXXXXXXAssignment 3 Dr. Yonas T. Weldeselassie Page 3

Step 4
You are given the declaration of a Date struct in the Starter Code text file. There is nothing to add to it. Go to
the next step.
Step 5
You are given the declaration of a Student class in the Starter Code text file. You are also given the definition
of its default constructor and overloaded output stream operator functions. Define all the remaining member
functions. Some comments are provided inside the class declaration to help you understand what you need to
do; although it should be fairly straight forward to understand the functionality of each member function and
thus straightforward to implement.
It is your responsibility to test the co
ectness of your class definition. To do so, I advise you to write a small
test program that tests each member and friend functions of the class before you continue to the next section.
Step 6
You are given a typedef for Map as follows:
typedef Map StudentMap;
There is nothing to add to it. Go to the next step.
Step 7
Now that we have the main building blocks for our school management system, we will design the system as
described below.
The system will be designed as a class with the following three member variables:
 SmarterA
ay studentList;
 This will store the students registered in the school.
 SmarterA
ay courseList;
 This will store the courses offered in the school.
 SmarterA
ay studentMapList;
 This will store for each student the courses the student is enrolled in and the letter grades for
the courses. See below for details.
The studentMapList member variable stores a Map of a StudentMap type (where the StudentMap is a
typedef described in step 6 above) for each student. Thus the size of the studentMapList is always the same
as the size of studentList.
The map for each student will store a key-value pair for each of the courses a student is enrolled in, where
 The key is an integer index of a course in the courseList member variable, and
 The value is the letter grade of the student for the course.
Whenever a student is enrolled in a course, a letter grade of 'N' is assigned automatically. The letter grade will
then be updated whenever the student is assigned a letter grade for the course.
A diagram representation of the school management system is shown below.
Fraser International College CMPT XXXXXXXXXXAssignment 3 Dr. Yonas T. Weldeselassie Page 4

studentList courseList
0 Joe Mark, DOB XXXXXXXXXX
1 Sara Gill, DOB XXXXXXXXXX
2 Ben Smith, DOB XXXXXXXXXX
3 Jessica John, DOB XXXXXXXXXX
4 Tran Nguyen, DOB XXXXXXXXXX
studentMapList
0
2 1
N A

1
2 0 1
B N F

2
1
C

3
4
1 0
N A
Observe that by having the students and courses stored separately and only having a map for each student
will save us a lot of computer memory especially when you have a large number of students and courses in the
School Management System. This is the basic idea behind relational databases.
0 CMPT135, Credit Hours = 4
1 PHY100, Credit Hours = 2
2 BIO150, Credit Hours = 3
Indexes of courses
in the courseList
Indexes of
students in the
studentList
Explanation of the studentMapList
As can be seen from the illustration diagram on the left, the studentMapList
member variable is simply a SmarterA
ay data type variable of Map data type
elements.
The studentMapList on the left shows, the student at index 0 (that is, Joe
Mark, DOB XXXXXXXXXXis enrolled in the course at index 2 (that is, BIO150)
and the course at index 1 (that is, PHY100). Moreover, it also shows Joe Mark
has not been assigned a letter grade for BIO150 course but that he has got the
letter grade 'A' for PHY100.
Similarly, we see that Sara Gill is enrolled in all the three courses offered in the
school (that is, BIO150, CMPT135, and PHY100)
Ben
Answered 1 days AfterApr 04, 2022

Solution

Vaibhav answered on Apr 06 2022
14 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