Hello, dear friend, you can consult us at any time if you have any questions, add WeChat: daixieit

CMPT 135 FIC 202201 - Assignment 3

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 borrow 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 library. 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 remove 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++ 2010 Express. 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 corruption or      index out of bound errors which are very well caught in Microsoft Visual C++ 2010 Express 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 break points (do research 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.

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 SmarterArray 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 correctness 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 correctness 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 correctness 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 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 correctness 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<int, char> as follows:

typedef Map<int, char> 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:

SmarterArray<Student> studentList;

This will store the students registered in the school.

SmarterArray<Course> courseList;

This will store the courses offered in the school.

SmarterArray<StudentMap> 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.

studentList


courseList

0

Joe Mark, DOB 2-8-1998

1

Sara Gill, DOB 3-2-2000

2

Ben Smith, DOB 12-7-1999

3

Jessica John, DOB 6-9-2000

4

Tran Nguyen, DOB 15-1-1998

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.


The declaration of SchoolManagementSystem class is shown below. For the sake of completeness, it is also provided in the Starter Code text file.