
Concept explainers
sing good OOP, write a C++ program that will read an input file to manage a list of students waiting to register for a ourse using a linked list.
The input file name is WaitList.txt and is located in the current directory of the project.
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 Tutor
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.
Be sure to use good
Use private member functions and variables.
Use public member functions for a constructor (where appropriate) and a driver method only.

Given that,
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.
The file layout is as follows:
action student name
Actions are defined as follows:
1 - add a student name to the end of the linked list
2 - add a 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 Tutor
1 Abby Achiever
3
2 Bill Brain
The program would display the waitlist 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 waitlist is then displayed. If the name is not found, an error message is displayed to the user.
If the user selects 'n' to delete 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: case clever
The student does not exist on the waitlist.
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.
Be sure to 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.
Trending nowThis is a popular solution!
Step by stepSolved in 2 steps

- Please write a full C++ and name the multiple files. Also, include the actual code and not a screenshot please. Please provide the code itself and not just the outputarrow_forwardIn C++ language. Please look at the instructions and help with program. This is for intermediate not advanced. so help me understand pleasearrow_forwardHello, can someone help me with this assignment? I am trying to do it on Python language: Develop a program that first reads in the name of an input file, followed by two strings representing the lower and upper bounds of a search range. The file should be read using the file.readlines() method. The input file contains a list of alphabetical, ten-letter strings, each on a separate line. Your program should output all strings from the list that are within that range (inclusive of the bounds). Ex: If the input is: input1.txt ammoniated millennium and the contents of input1.txt are: aspiration classified federation…arrow_forward
- write in c++Write a program that would allow the user to interact with a part of the IMDB movie database. Each movie has a unique ID, name, release date, and user rating. You're given a file containing this information (see movies.txt in "Additional files" section). The first 4 rows of this file correspond to the first movie, then after an empty line 4 rows contain information about the second movie and so forth. Format of these fields: ID is an integer Name is a string that can contain spaces Release date is a string in yyyy/mm/dd format Rating is a fractional number The number of movies is not provided and does not need to be computed. But the file can't contain more than 100 movies. Then, it should offer the user a menu with the following options: Display movies sorted by id Display movies sorted by release date, then rating Lookup a release date given a name Lookup a movie by id Quit the Program The program should perform the selected operation and then re-display the menu. For…arrow_forwardPython please: Given the input file input1.csv write a program that first reads in the name of the input file and then reads the file using the csv.reader() method. The file contains a list of words separated by commas. Your program should output the words in a sorted list. The contents of the input1.csv are: hello,cat,man,hey,dog,boy,Hello,man,cat,woman,dog,Cat,hey,boy Example: If the input is input1.csv the output is: ['Cat', 'Hello', 'boy', 'boy', 'cat', 'cat', 'dog', 'dog', 'hello', 'hey', 'hey', 'man', 'man', 'woman'] Note: There is a newline at the end of the output.arrow_forwardWrite a c++ program that reads in input commands related to a queue with no more than ten elements and performs the specified operations. Note that you should create three files, one for the main, one for Queue.h, and one for Queue.cpp. Those commands are: 'E', which will be followed by a number. You should enqueue that number 'D', which will dequeue the value from the front of the queue and print it, followed by a new line 'K'. which will peek at the value at the front of the queue and print it, followed by a new line 'Q', which will quit the program You can assume that all the input is valid.arrow_forward
- In c++ Create a new project named lab9_2. You will continue to use the Courses class, but this time you will create a vector of Courses. The file you will read from is below: 6CSS 2A 1111 35CSS 2A 2222 20CSS 1 3333 40CSS 1 4444 33CSS 3 5555 15CSS 44 6666 12 Read this information into a vector of Courses. Then, print out a summary of your vector. Here's a sample driver: #include <iostream>#include <string>#include <fstream>#include <vector>#include <cstdlib>#include "Course.h"using namespace std;int main(){vector<Course> myclass;string dep, c_num;int classes, sec, num_stus;ifstream fin("sample.txt");if (fin.fail()){cout << "File path is bad\n";exit(1);}fin >> classes;for (int i = 0; i < classes; i++){fin >> dep >> c_num >> sec >> num_stus;// Now how do you create a Course object// that contains the information you just read in// and add it to your myclass vector?}cout << "Here are the college courses: "…arrow_forwardWrite a program in C++ that prints a sorted phone list from a database of names and phone numbers. The data is contained in two files named "phoneNames.txt" and "phoneNums.txt". The files may contain up to 2000 names and phone numbers. The files have one name or one phone number per line. To save paper, only print the first 50 lines of the output. Note: The first phone number in the phone number file corresponds to the first name in the name file. The second phone number in the phone number file corresponds to the second name in the name file. etc. You will find the test files in the Asn Five.ziparrow_forwardWrite a program in C++ that creates a file. Write this data into that file column wise as a header. Then keep adding data in colum wise format. The program should check if there is data in the file and then write the data in the next row. First add: TIME DAY MONTH YEAR Then check the file and add: 01:25 07 JUNE 2008 Then check again the file and add this in next row: 14:00 30 MARCH 2019arrow_forward
- You are going to write a program (In Python) called BankApp to simulate a banking application.The information needed for this project are stored in a text file. Those are:usernames, passwords, and balances.Your program should read username, passwords, and balances for each customer, andstore them into three lists.userName (string), passWord(string), balances(float)The txt file with information is provided as UserInformtion.txtExample: This will demonstrate if file only contains information of 3 customers. Youcould add more users into the file.userName passWord Balance========================Mike sorat1237# 350Jane para432@4 400Steve asora8731% 500 When a user runs your program, it should ask for the username and passwordfirst. Check if the user matches a customer in the bank with the informationprovided. Remember username and password should be case sensitive.After asking for the user name, and password display a menu with the…arrow_forwardWrite a python program that reads the contents of a text file. The program should create a dictionary in which the keys are the individual words found in the file and the values are the number of times each word appears. For example, if the word "the" appears 128 times, the dictionary would contain an element with 'the' as the key and 128 as the value. The program should either display the frequency of each word or create a second file containing a list of each word and it's frequency. This program has really been giving me trouble. Any help is great appreciated. Thanks so much!arrow_forwardCreate a new C++ project in Visual Studio (or an IDE of your choice). Add the files listed below to your project: BinaryTree.h Download BinaryTree.h BinarySearchTree.h Download BinarySearchTree.h main.cpp Download main.cpp Build and run your project. The program should compile without any errors. Note that function main() creates a new BST of int and inserts the nodes 12, 38, 25, 5, 15, 8, 55 (in that order) and displays them using pre-order traversal. Verify that the insertions are done correctly. You may verify it manually or use the visualization tool at https://www.cs.usfca.edu/~galles/visualization/BST.html. (Links to an external site.) Do the following: 1. add code to test the deleteNode and search member functions. Save screenshot of your test program run. 2. add code to implement the nodeCount member function of class BinaryTree. Test it and save screenshot of your test program run. 3. add code to implement the leafCount member function of class BinaryTree. Test it and…arrow_forward
- Database System ConceptsComputer ScienceISBN:9780078022159Author:Abraham Silberschatz Professor, Henry F. Korth, S. SudarshanPublisher:McGraw-Hill EducationStarting Out with Python (4th Edition)Computer ScienceISBN:9780134444321Author:Tony GaddisPublisher:PEARSONDigital Fundamentals (11th Edition)Computer ScienceISBN:9780132737968Author:Thomas L. FloydPublisher:PEARSON
- C How to Program (8th Edition)Computer ScienceISBN:9780133976892Author:Paul J. Deitel, Harvey DeitelPublisher:PEARSONDatabase Systems: Design, Implementation, & Manag...Computer ScienceISBN:9781337627900Author:Carlos Coronel, Steven MorrisPublisher:Cengage LearningProgrammable Logic ControllersComputer ScienceISBN:9780073373843Author:Frank D. PetruzellaPublisher:McGraw-Hill Education





