
Computer Networking: A Top-Down Approach (7th Edition)
7th Edition
ISBN: 9780133594140
Author: James Kurose, Keith Ross
Publisher: PEARSON
expand_more
expand_more
format_list_bulleted
Question
Write a C++ program to prompt user for a file name and read the data containing information for a course, store and process the data, display a menu and allow user to pick an operation to perform continue till user decides to quit, and at the end print a final report shown below.
Details:
- Set the array size to 50, but there could be less or more students info in the file, manage the list according the actual data elements.
- Develop a struct named Student to represent a student’s data: (Minimum the following data members need to be included), more is OK.
- Name (First, Last)
- ID
- Scores (An array to store test scores)
- Quiz (score for 1 quiz)
- Grade
- Average
- Write all the necessary utility functions to process the Student struct (readStudent, printStudent, processStudent,…)
- You may update and use the struct definition and utility functions developed for
Programming assignment 5 or develop a new one.
- You may update and use the struct definition and utility functions developed for
- Develop any additional functions to process a list of students as necessary (Such as readStudentList, printStudentList, processStudentList, ….).
- Required Operations are: (use functions to do these)
- Print course content to the monitor and a file (refer to sample output below)
- Sort the list of students and print it to the monitor:
- Alphabetical (Based on last name)
- Search the list of students and print all the details of a student to the monitor (prompt user for the last name of the student, assume all last names are unique)
- Add a new student to the list (Prompt user for data for the new student, don’t add duplicates, check last name to make sure they are not on the list already, if the student is already on the list print an error message and continue with the program))
- Delete a student from the list (prompt user for the last name of the student, if student is not on the list print an error message and continue with the program)
- main function will:
- declare an array of Students to store and manage students' data
- call the function readList to open file and read the data and store them in the array of students. If the file did not open or is blank print an error message and stop the program. Refer to the exact messages provided in the test cases.
- call function procesList to process the list of students by
- calling function calcAverage
- calling function assignGrade
- call function printToFile to print a complete report to a file (Refer to the sample below)
- call function searchStudent to prompt user for a student's last name, if on the list print details, otherwise print error message (Refer to the sample below)
- call function addStudent to add a new student to the list
- call function removeStudent to remove a student from the list
- call function printToMonitor to print the student's info. (Refer to the sample below)
- call function sortList to sort the list alphabetically
- call function printToMonitor to print the student's info. (Refer to the sample below)
Requirements:
- Program must be modular (all tasks must be done in functions)
- Must include functions to process object or list of objects (Auxiliary/Helper functions)
- Main should be short and mostly made of call to functions. (no loops)
- Prompt user for all input and output file names
- At start of program execution, prompt user for an input file name, start the program with loading the data into the program and then do all the operations one by one pause the program and let the user continue.
- Global variables are not allowed. All variables must be passed to functions.
- Your program should calculate the average for the student and assign a letter grade using the provided scale table.
- To calculate the average, use the highest 5 test scores and the quiz score. (Drop the lowest test score).
- Tests are worth 90% of the total and the quiz is 10%.
- Verify that all scores are between 0..100, if not set average to -1 and grade to I.
- Use the following grading scale:
- If the average is from 90 to 100 the grade is A
- If the average is from 80 to 89.9 the grade is B
- If the average is from 70 to 79.9 the grade is C
- If the average is from 60 to 69.9 the grade is D
- If the average is from 0 to 59.9 the grade is F
- If any score is invalid grade is I
- Use attached data files to test your program. They are included in this folder on zyBooks.
Input data file organization:
Course_Name
Course_Id Location
List of students First Last (first is always 1 name but last name could have several part separated by space)
ID Quiz Test1 … Test6 (Assume each student has 6 test scores)

Transcribed Image Text:Error messages
Bad file name: Failed to open file.
File with no data: Empty file.
Adding student Error Adams is on the list, duplicated names are not allowed. (Adams is the student we are trying to add)
Removing student and search Error Adams is on the list. (Adams is the student we are trying to remove or find)
If your process is different, then the test case will fail, make sure to follow the same call order in the main

Transcribed Image Text:Sample input file: (Assume all names and IDs in the list are unique and must stay unique.)
Introduction to Computer Programming Fundamentals
CSCI 1
MBA 315
John Adams
111223333 100 87 93 90 90 89 91
Willy Smith Jr.
222114444 90 73 67 77 70 80 90
Phil Jordan
777886666 100 80 70 50 -60 90 100
Sample output file format: (Final report)
Course Name:
Course ID:
Class Location:
Name
Adams, John
Smith Jr., Willy
Jordan, Phil
Name
Adams, John
Smith Jr., Will
Jordan, Phil
Introduction to Computer Programming Fundamentals
CSCI 1
MBA 315
ID
Student list print format to the monitor:
111-22-3333
222-11-4444
777-88-6666
Average:
Letter Grade: A
Average
91.5
87.0
-1
Student's detail format to the monitor:
Name:
Adams, John
ID:
111223333
Quiz Score:
100.00
Test Scores: 87.00
91.54
93.00
Grade
A
B
I
Average
91.5
87.0
-1
90.00
Grade
A
B
I
90.00
89.00
91.00
Expert Solution

This question has been solved!
Explore an expertly crafted, step-by-step solution for a thorough understanding of key concepts.
This is a popular solution
Trending nowThis is a popular solution!
Step by stepSolved in 2 steps

Knowledge Booster
Similar questions
- Non dynamic.arrays are allocated at runtime where dynamic arrays are allocated at compile time. True False Question 4 There are other ways to end a loop other than just the loop condition evaluating to false. True Falsearrow_forwardI need this done in C++ please! This program implements the top-level menu option 'R' of the Airport Application and constitutes Part 2 of the Airport Application Project requirement. When the user selects 'R' in the airport application, she will be taken to the "page" that is displayed by this program. This program is meant to replace the flight status report program (Programming Assignment 3) that did not use arrays to store the flight status information. It also reads the information from the file token wise.arrow_forwardWrite the statement that declares and instantiates an array of type double using the identifier temperatures that will hold 30 values. Edit View Insert Format Tools Table 12pt v Paragraph v :arrow_forward
- A file USPopulation.txt contains the population of the US starting in year 1950 and then each subsequent record has the population for the following year. USPopulation.txtDownload USPopulation.txt Write a program that uses an array with the file that displays these in a menu and then produces the results. This is not an Object Oriented Program but should be a procedural program, calling methods to do the following: 1: Displays the year and the population during that year 2. The average population during that time period (Add up the populations of all records and divide by the number of years). 3. The year with the greatest increase in population - print the year and that population and that amount. To figure this out, compare the difference in population before of say year 1950 and 1951, store that difference somewhere. Compare 1951 with 1952, find that difference. Is that difference greater than the stored difference? If so, move that the the maximum place. 4.…arrow_forwardWrite a C++ Program using classes, functions (recursive and otherwise), arrays and other C++ commands to sort a file using Selection Sort. The user will enter the filename. The file should be sorted by the following fields: first by Last Name, then by Mother's Maiden Name, then by First Name and finally by Second Name (or Initial). The sorted file should be written to file and the first 10 results displayed on screen. L E-11arrow_forward/* (name header) #include // Function declaration int main() { int al[] int a2[] = { 7, 2, 10, 9 }; int a3[] = { 2, 10, 7, 2 }; int a4[] = { 2, 10 }; int a5[] = { 10, 2 }; int a6[] = { 2, 3 }; int a7[] = { 2, 2 }; int a8[] = { 2 }; int a9[] % { 5, 1, б, 1, 9, 9 }; int al0[] = { 7, 6, 8, 5 }; int all[] = { 7, 7, 6, 8, 5, 5, 6 }; int al2[] = { 10, 0 }; { 10, 3, 5, 6 }; %3D std::cout « ((difference (al, 4) « ((difference(a2, 4) <« ((difference (a3, 4) « ((difference(a4, 2) <« ((difference (a5, 2) <« ((difference (a6, 2) <« ((difference (a7, 2) <« ((difference(a8, 1) « ((difference (a9, 6) « ((difference(a10, 4) " <« ((difference(al1, 7) « ((difference (al2, 2) == 10) ? "OK\n" : "X\n"); << "al: << "a2: %3D 7)? "OK" : "X") << std::endl == 8) ? "OK\n" : "X\n") 8) ? "OK\n" : "X\n") == 8) ? "OK\n" : "X\n") == 8) ? "OK\n" : "X\n") == 1) ? "OK\n" : "X\n") == 0) ? "OK\n" : "X\n") 0) ? "OK\n" : "X\n") == 8) ? "OK\n" : "X\n") == 3) ? "OK\n" : "X\n") == 3) ? "OK\n" : "X\n") == << "a3: == << "a4: <<…arrow_forward
- Write code for a sequential search that determines whether the value −1 is stored in an array with a reference variable named values. The code should display a message indicating whether the value was found.arrow_forwardIn C++ Write a code snippet to automatically increase the size of the dynamic array playerToolbox[10] if it becomes full while reading data in from a file.arrow_forward1) Define a global variable Emps that is an array of pointers to employee structs. 2) Change your createEmployee function to add the new employee to the Emps array. It should place it in the first slot that contains a NULL. 3) Write a listEmployees function that will call your display function on each employee in the array. 4) Change main to have a loop that looks for user commands. • If the user types HIRE, you should call createEmployee. If the user types LIST, you should call listEmployees. • If the user types QUIT, you should exit the loop, which will then cause the program to exit. 5) Write a findEmployee function that takes a string parameter and returns the employee pointer with that name or NULL if no such person exists. Change main to add a FIND name command that will find and display a single employee.arrow_forward
- c language and use int main format pleasearrow_forwardDue in C languagearrow_forwardThe following array of structures is used to hold data of your IPC144 grade center strcut grades {char name[101]; unsigned final; unsigned total;} struct grades myClass[25]; Write a function that gets the class grades array as a parameter and prints the list of people who passed the course (a student passes a course if he/she passes the final as well as the total) and their total mark. The function should also print the class average at the end (based on the total marks) void printPassedAverage(struct grades myClass, int size) The output should be like this Students passed:--------------------- John Smith 85 Jane Doe 65 Roy Crowe 80 Julia Stuart 55 Rob Gates 60 Class average: 69arrow_forward
arrow_back_ios
arrow_forward_ios
Recommended textbooks for you
- Computer Networking: A Top-Down Approach (7th Edi...Computer EngineeringISBN:9780133594140Author:James Kurose, Keith RossPublisher:PEARSONComputer Organization and Design MIPS Edition, Fi...Computer EngineeringISBN:9780124077263Author:David A. Patterson, John L. HennessyPublisher:Elsevier ScienceNetwork+ Guide to Networks (MindTap Course List)Computer EngineeringISBN:9781337569330Author:Jill West, Tamara Dean, Jean AndrewsPublisher:Cengage Learning
- Concepts of Database ManagementComputer EngineeringISBN:9781337093422Author:Joy L. Starks, Philip J. Pratt, Mary Z. LastPublisher:Cengage LearningPrelude to ProgrammingComputer EngineeringISBN:9780133750423Author:VENIT, StewartPublisher:Pearson EducationSc Business Data Communications and Networking, T...Computer EngineeringISBN:9781119368830Author:FITZGERALDPublisher:WILEY

Computer Networking: A Top-Down Approach (7th Edi...
Computer Engineering
ISBN:9780133594140
Author:James Kurose, Keith Ross
Publisher:PEARSON

Computer Organization and Design MIPS Edition, Fi...
Computer Engineering
ISBN:9780124077263
Author:David A. Patterson, John L. Hennessy
Publisher:Elsevier Science

Network+ Guide to Networks (MindTap Course List)
Computer Engineering
ISBN:9781337569330
Author:Jill West, Tamara Dean, Jean Andrews
Publisher:Cengage Learning

Concepts of Database Management
Computer Engineering
ISBN:9781337093422
Author:Joy L. Starks, Philip J. Pratt, Mary Z. Last
Publisher:Cengage Learning

Prelude to Programming
Computer Engineering
ISBN:9780133750423
Author:VENIT, Stewart
Publisher:Pearson Education

Sc Business Data Communications and Networking, T...
Computer Engineering
ISBN:9781119368830
Author:FITZGERALD
Publisher:WILEY