Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Overview The purpose of the project is to exercise linked lists to find the best times to hold the C + + Programming class. Technique

Overview
The purpose of the project is to exercise linked lists to find the best times to hold the C++ Programming class.
Technique / Requirements
Read in a set of text files that contains the convenient times to start a class for each student (this project came about when we were trying to find the best time to hold an online synchronous class during Covid). You will write code that:
1) Prompts the user to enter a name of a text file that has a list of the corresponding students preferred class time. The format of this file is described in detail below.
2) Once a file name is entered, your program needs to read in the file its entirety. The program should warn the user if the file cannot be opened or if the file contains improperly formatted data.
3) Each preferred start time provided in the files must be stored in a linked list, but you can use an array of pointers, one index for each day of the week.
4) Your code should not assume the times (or days in the week) in the file are in any particular order.
5) You should create a new node for every time found in any of the student schedule files. When you encounter multiple students selecting the same time, you should increment a counter in the corresponding node and maintain a list of all the students that chose the time for the given node. Recall each students schedule file will be named with their first name, so your program will know the student name to save in the name list associated with each node.
6) After all the student files have been read, your program should ask for the minimum number matches to display. Finally, your program should traverse all the linked list and show all the times that have the minimum number of matches, along with the list of students who matched.
7) The data structure your program uses should be similar to this example showing that Sandy and Mae prefer a start time of Monday at 10:30am and Austin, Alex, and Carlos prefer a start time of 1:30pm.
Student preferred times file format
1) The file name of the text file matches the students first name
2) Each line of the file starts with :
3) must be one of: sun, mon, tue, wed, thur, fri, sat. If the student didnt want to attend class on a particular day, there wont be a line for that day.
4) times must be in military /24 hour format with 30 minute granularity. Use .5 to represent starting the class at 30 minutes after the hour. For example 2:30pm would be represented with 14.5
5) Times are not in sequential order. 6. Note you cannot use container objects from the STL. You are required to build up the data structure pictured in the document.

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Students also viewed these Databases questions

Question

What does Processing of an OLAP Cube accomplish?

Answered: 1 week ago