Answered step by step
Verified Expert Solution
Question
1 Approved Answer
In C++ by using Linked Lists A faculty member would like a program to keep track of the current numbers of Flu cases in their
In C++ by using Linked Lists
A faculty member would like a program to keep track of the current numbers of Flu cases in their classes. Each class has a Course Name, Section Number, and Number of students enrolled. Write a menu-driven program that uses a linked list to record the following information for each course that the faculty member teaches this semester: Course Name Section Number Total Students Students with flu Students Recovered from flu Include the following menu options: 1. Add a class 2. Increment students with flu 3. Move 1 student from with flu to Recovered from flu 4. Print List 5. Exit Each option is explained below: 1. Add a class: Reads the Course Name, Section Number, and Total Students from the user and inserts a node with the data into the linked list, in alphabetic order by course name. Set the Students with flu and Students Recovered from flu fields to 0. 2. Increment Students with flu: Prints a numbered list of the course names and sections and allows the user to choose one. Finds the List Node for that course and increments the Students with flu field. 3. Move 1 student from "with flu" to "Recovered from flu": Prints a numbered list of the course names and sections and allows the user to choose one. Finds the List Node for that course, then decrements the Students with flu field and increments the Students Recovered from flu field. 4. Print List: Prints all information for each node in the list, in a table with column headings. Print totals at the bottom of the Total Students, Students with flu, and Students Recovered from flu columns. 5. Exit: Exits the programStep by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started