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

Systems Architecture
7th Edition
ISBN:9781305080195
Author:Stephen D. Burd
Publisher:Stephen D. Burd
Chapter3: Data Representation
Section: Chapter Questions
Problem 12VE
icon
Related questions
Question

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: Introduction to Computer Programming Fundamentals Course ID: CSCI 1 Class Location: MBA 315 Name ID Average Grade Adams, John 111-22-3333 91.5 A Smith Jr., Willy 222-11-4444 87.0 B Jordan, Phil 777-88-6666 -1 I

Student list print format to the monitor:

Name Average Grade Adams, John 91.5 A Smith Jr., Will 87.0 B Jordan, Phil -1 I

Student's detail format to the monitor:

Name: Adams, John ID: 111223333 Quiz Score: 100.00 Test Scores: 87.00 93.00 90.00 90.00 89.00 91.00 Average: 91.54 Letter Grade: A

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)

 

 

▪ 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).
o 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:▪ 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). o 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)
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.
o Name (First, Last)
o ID
o Scores (An array to store test scores)
• Quiz (score for 1 quiz)
o 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.
Develop any additional functions to process a list of students as necessary (Such as readStudentList, printStudent List,
processStudentList,....).
Required Operations are: (use functions to do these)
o 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)
o 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)
Transcribed Image Text: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. o Name (First, Last) o ID o Scores (An array to store test scores) • Quiz (score for 1 quiz) o 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. Develop any additional functions to process a list of students as necessary (Such as readStudentList, printStudent List, processStudentList,....). Required Operations are: (use functions to do these) o 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) o 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)
Expert Solution
trending now

Trending now

This is a popular solution!

steps

Step by step

Solved in 2 steps

Blurred answer
Knowledge Booster
Binary numbers
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
Systems Architecture
Systems Architecture
Computer Science
ISBN:
9781305080195
Author:
Stephen D. Burd
Publisher:
Cengage Learning