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

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.

Overview The purpose of the project is to exercise linked lists to

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.

Sample data for testing:

(save the below sample data into separate files, and name them as 'studentX' - here X represents number starting from 0,1,2,3...

student0:

wed: 18.5, 18 thur: 13, 13.5, 14, 15, 16, 17, 14.5, 15.5, 16.5

student1:

mon:15.5 tue:15.5 wed:15.5 thur:15.5 fri:15.5

student2:

mon:18.5,19 tue:18.5,19 wed:18.5,19 thu:18.5,19

student3:

mon:9,9.5,10,11,12,13,14,15,15.5,16,16.5,17 tue:9,9.5,10,11,12 wed:9,9.5,10,11,12,13,14,15,15.5,16,16.5,17 thu:9,9.5,10,11,12 fri:9,9.5,10,11,12,13,14,15,15.5,16,16.5,17 sat:13,14,15,16,17 sun:13,14,15,16,17

student4:

mon: 15, 15.5, 16, 16.5, 17 tue: 15, 15.5, 16, 16.5, 17 wed: 15, 15.5, 16, 16.5, 17 thu: 15, 15.5, 16, 16.5, 17 fri: 15, 15.5, 16, 16.5, 17

student5:

wed:15.5,16,14,15,14.5 fri:15.5,16,14,15,14.5 tue:15.5,16,14,15,14.5 thu:15.5,16,14,15,14.5 mon:15.5,16,14,15,14.5

student6:

mon:16,17,18,19,20,21 tue:16,17,18,19,20,21 wed:16,17,18,19,20,21 thu:16,17,18,19,20,21 fri:16,17,18,19,20,21

student7:

mon:8, 17,17.5,18 tue:8, 17,17.5,18 wed:8, 17,17.5,18 thu:8, 17,17.5,18 fri:8, 17,17.5,18 sat:8,8.5,9, 17,17.5,18 sun :8,8.5,9, 17,17.5,18

\begin{tabular}{|l|} \hline sun \\ \hline mo \\ \hline tu \\ \hline we \\ \hline th \\ \hline fri \\ \hline sat \\ \hline \end{tabular}

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!