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.
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.
Computer Networking: A Top-Down Approach (7th Edition)
7th Edition
ISBN:9780133594140
Author:James Kurose, Keith Ross
Publisher:James Kurose, Keith Ross
Chapter1: Computer Networks And The Internet
Section: Chapter Questions
Problem R1RQ: What is the difference between a host and an end system? List several different types of end...
Related questions
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)
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 now
This is a popular solution!
Step by step
Solved in 2 steps
Recommended textbooks for you
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
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