I need help on this home work: Using OOP, write a C++ program that will read an input file to manage a list of students waiting to register for a course using a linked list.The input file name is WaitList.txt and is located in the current directory of the project. Waitlist.txt content: 1 Samuel Stone1 Brett Bacher2 Emily Evans44331 Zachary Zillings2 Carson Cummings1 Penny Plumber31 Tammy Thompson The file layout is as follows:action    student nameActions are defined as follows:1 - add student name to the end of the linked list2 - add student name to the beginning of the linked list3 - delete the student at the beginning of the linked list4 - delete the student at the end of the linked listActions #1 and #2 require student names. Actions #3 and #4 do not.For example, if the input file contents contained: 1    Sally Sue Student1    Peter Pupil1    Sam Scholar42    Terri Flowers1    Abby Achiever32    Bill Brain The program would display the wait list as follows: The Wait List:1. Bill Brain2. Sally Sue Student3. Peter Pupil4. Abby AchieverEnd of List. Then the program will prompt the user if they wish to delete a student by name. If the user selects 'y', the program will prompt for a student name.If the name is found in the linked list, the student node will be deleted and the wait list is then displayed. If the name is not found, an error message is displayed to the user.If the user selects 'n' to deleting a student by name, the program will end. The Wait List:1. Bill Brain2. Sally Sue Student3. Peter Pupil4. Abby AchieverEnd of List.Would you like to delete a student by name (y = yes, n = no): YEnter the full name of the student to delete: peter pupilStudent deleted.The Wait List:1. Bill Brain2. Sally Sue Student3. Abby AchieverEnd of List.Would you like to delete a student by name (y = yes, n = no): yEnter the full name of the student to delete: casey cleverStudent does not exist on the wait list.The Wait List:1. Bill Brain2. Sally Sue Student3. Abby AchieverEnd of List.Would you like to delete a student by name (y = yes, n = no): aInvalid response, please enter y = yes, n = no: nProgram end. Validate all user input values, and use good programming methodology and keep your project modular. Use private member functions and variables.Use public member functions for a constructor (where appropriate) and a driver method only.These specifications do not give a list of method names to be used. It is assumed the program will use several methods doing one task each.NOTE: Any submission that uses global variables or does not use a class and object appropriately will result in a project grade of 0.

Database System Concepts
7th Edition
ISBN:9780078022159
Author:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Chapter1: Introduction
Section: Chapter Questions
Problem 1PE
icon
Related questions
Question

I need help on this home work:

Using OOP, write a C++ program that will read an input file to manage a list of students waiting to register for a course using a linked list.

The input file name is WaitList.txt and is located in the current directory of the project.

Waitlist.txt content:
1 Samuel Stone
1 Brett Bacher
2 Emily Evans
4
4
3
3
1 Zachary Zillings
2 Carson Cummings
1 Penny Plumber
3
1 Tammy Thompson


The file layout is as follows:

action    student name

Actions are defined as follows:

1 - add student name to the end of the linked list
2 - add student name to the beginning of the linked list
3 - delete the student at the beginning of the linked list
4 - delete the student at the end of the linked list

Actions #1 and #2 require student names. Actions #3 and #4 do not.

For example, if the input file contents contained:

1    Sally Sue Student
1    Peter Pupil
1    Sam Scholar
4
2    Terri Flowers
1    Abby Achiever
3
2    Bill Brain


The program would display the wait list as follows:

The Wait List:

1. Bill Brain
2. Sally Sue Student
3. Peter Pupil
4. Abby Achiever

End of List.


Then the program will prompt the user if they wish to delete a student by name. If the user selects 'y', the program will prompt for a student name.
If the name is found in the linked list, the student node will be deleted and the wait list is then displayed. If the name is not found, an error message is displayed to the user.

If the user selects 'n' to deleting a student by name, the program will end.

The Wait List:

1. Bill Brain
2. Sally Sue Student
3. Peter Pupil
4. Abby Achiever

End of List.


Would you like to delete a student by name (y = yes, n = no): Y
Enter the full name of the student to delete: peter pupil

Student deleted.



The Wait List:

1. Bill Brain
2. Sally Sue Student
3. Abby Achiever

End of List.


Would you like to delete a student by name (y = yes, n = no): y
Enter the full name of the student to delete: casey clever

Student does not exist on the wait list.



The Wait List:

1. Bill Brain
2. Sally Sue Student
3. Abby Achiever

End of List.


Would you like to delete a student by name (y = yes, n = no): a
Invalid response, please enter y = yes, n = no: n

Program end.

Validate all user input values, and use good programming methodology and keep your project modular.

Use private member functions and variables.
Use public member functions for a constructor (where appropriate) and a driver method only.

These specifications do not give a list of method names to be used. It is assumed the program will use several methods doing one task each.

NOTE: Any submission that uses global variables or does not use a class and object appropriately will result in a project grade of 0. 

AI-Generated Solution
AI-generated content may present inaccurate or offensive content that does not represent bartleby’s views.
steps

Unlock instant AI solutions

Tap the button
to generate a solution

Knowledge Booster
Stack operations
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Similar questions
  • SEE MORE QUESTIONS
Recommended textbooks for you
Database System Concepts
Database System Concepts
Computer Science
ISBN:
9780078022159
Author:
Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:
McGraw-Hill Education
Starting Out with Python (4th Edition)
Starting Out with Python (4th Edition)
Computer Science
ISBN:
9780134444321
Author:
Tony Gaddis
Publisher:
PEARSON
Digital Fundamentals (11th Edition)
Digital Fundamentals (11th Edition)
Computer Science
ISBN:
9780132737968
Author:
Thomas L. Floyd
Publisher:
PEARSON
C How to Program (8th Edition)
C How to Program (8th Edition)
Computer Science
ISBN:
9780133976892
Author:
Paul J. Deitel, Harvey Deitel
Publisher:
PEARSON
Database Systems: Design, Implementation, & Manag…
Database Systems: Design, Implementation, & Manag…
Computer Science
ISBN:
9781337627900
Author:
Carlos Coronel, Steven Morris
Publisher:
Cengage Learning
Programmable Logic Controllers
Programmable Logic Controllers
Computer Science
ISBN:
9780073373843
Author:
Frank D. Petruzella
Publisher:
McGraw-Hill Education