logo Use CA10RAM to get 10%* Discount.
Order Nowlogo
(5/5)

basic C++ syntax including branching structures Write classes and instantiate those classes using a constructor create a templated data structure (queue or stack) use simple file input

INSTRUCTIONS TO CANDIDATES
ANSWER ALL QUESTIONS

1.  Overview

In this project, you will:

  • Practice basic C++ syntax including branching structures

  • Write classes and instantiate those classes using a constructor

  • Create a templated data structure (queue or stack)

  • Use simple file input

  • Use overloaded operators to access templated data structure

2.  Background

Many of you have had the opportunity to register for courses for next semester already. As such, you were probably able to navigate the sometimes-frustrating process of finding a course only to have it cruelly ripped out from under you when the course was full. What if you had the ability to be added to the waitlist and then when the waitlist was full, a new section of the class was offered automatically?! What a magical place that would be.

For this project, we will be building a scheduler that takes in a list of student requests and will generate the required courses to meet the demand for those students. In order to do this, we will be building a templated data structure that works like a queue where the juniors and seniors would be inserted into the front of the structure and the other students would be added behind them. We will be building this structure using a dynamically allocated array.

3.  Assignment Description

Class 1 – Tqueue – This is a very important class. It is used to manage each Classes roster and waitlist. It is templated so that it could store the information about whatever it is designed to hold (in this case Student pointers). As a dynamically allocated array, the Tqueue has a maximum capacity (which is passed to it) You will need to implement normal queue functions such as Enqueue (which inserts in the end), Dequeue (which removes from front), Sort (which sorts the content in the Tqueue – NOTE: For the sort function, you may need to write it specially to use pointers), capacity functions (including IsEmpty, IsFull, and Size), an overloaded[] operator (to get specific location in the Tqueue), and ClearData (which removes all data from the Tqueue). Finally, you must implement the copy constructor and assignment operator in this class. There should be absolutely NO references to anything about classes or students in Tqueue!

You should implement this class by itself and then test it completely before using it. There is sample test code at the bottom of Tqueue.cpp. You can uncomment it as you code functions to test it incrementally. Do not forget how we must implement templated classes!

Class 2: Class – For this project, a Class represents a specific offering of a course. A Class object is made up of a name (like CMSC 201), a section (integer starting at 1), and two Tqueues (one named m_roster and one named m_waitlist). The m_roster represents the number of students in the class (starts capped at 10 per class). The m_waitlist represents the students waiting for the class (starts capped at 3 per class). When a class’s roster and waitlist are both full, a new section of that class is opened and everyone in the waitlist is moved to the new class. Otherwise, read the function descriptions for more details in Class.h.

Once a class’s waitlist is full, a new section of that class is created, and the students from the waitlist are moved to the new class’s roster, the original class is closed. The waitlist from the first section will never be repopulated.

For example, if class 1 – section 1 has 10 students on the roster and 3 on the waitlist when we add another student to class 1, a new class (section 2) would be created and the three from the waitlist and the new student would all four be moved to the roster of section 2. The figure below describes how it should work:

 

Class 3: Scheduler – This is the class that loads the file of students and loads students into specific classes. It is called directly from driver.cpp. The main menu manages the scheduling tool and allows the user to display all classes (and sections), rosters for specific sections, search for a specific string (searches first and last names) and sorts all rosters. Scheduler does most of the heavy lifting of the waitlist mechanics listed above as it loads a file. For more details, check out Scheduler.h.

Class 4: Student – This is the class that contains all the information about each student. Each student has a first name, last name, and student ID. There is an overloaded << operator and a < operator (for sorting).

The input files are formatted with first name, last name, student id, and the course.

There are four test files (proj5_test1.txt, proj5_test2.txt, proj5_test3.txt, and proj5_test4.txt) each increasingly complicated (and large). The first test file is named proj5_test1.txt and has the student’s names be numbers such as One One or Six Six. This is to help with debugging the m_roster to m_waitlist process described above.

(5/5)
Attachments:

Related Questions

. Introgramming & Unix Fall 2018, CRN 44882, Oakland University Homework Assignment 6 - Using Arrays and Functions in C

DescriptionIn this final assignment, the students will demonstrate their ability to apply two ma

. The standard path finding involves finding the (shortest) path from an origin to a destination, typically on a map. This is an

Path finding involves finding a path from A to B. Typically we want the path to have certain properties,such as being the shortest or to avoid going t

. Develop a program to emulate a purchase transaction at a retail store. This program will have two classes, a LineItem class and a Transaction class. The LineItem class will represent an individual

Develop a program to emulate a purchase transaction at a retail store. Thisprogram will have two classes, a LineItem class and a Transaction class. Th

. SeaPort Project series For this set of projects for the course, we wish to simulate some of the aspects of a number of Sea Ports. Here are the classes and their instance variables we wish to define:

1 Project 1 Introduction - the SeaPort Project series For this set of projects for the course, we wish to simulate some of the aspects of a number of

. Project 2 Introduction - the SeaPort Project series For this set of projects for the course, we wish to simulate some of the aspects of a number of Sea Ports. Here are the classes and their instance variables we wish to define:

1 Project 2 Introduction - the SeaPort Project series For this set of projects for the course, we wish to simulate some of the aspects of a number of

Ask This Question To Be Solved By Our ExpertsGet A+ Grade Solution Guaranteed

expert
Um e HaniScience

659 Answers

Hire Me
expert
Muhammad Ali HaiderFinance

939 Answers

Hire Me
expert
Husnain SaeedComputer science

605 Answers

Hire Me
expert
Atharva PatilComputer science

767 Answers

Hire Me