Use what you have leamed about loops, arrays and file stream. Write a C + program that asks the user for a file name. Presume that the file holds a sequence of numbers, cach of which is written in a separate line. The program must read the contents of the file in an array, and then displays the following data: • Smallest number in the array. • Largest number in the array • Total numbers in the array. • Average of numbers in the array. • Occurrence of a number entered by a user.

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...
icon
Related questions
Question
令ll。
2:38
OOP Lab #10.pdf
OOP Lab #10
Use what you have learned about loops, arrays and file stream. Write a C++ program that asks the user for a
file name. Presume that the file holds a sequence of numbers, cach of which is written in a separate line. The
program must read the contents of the file in an array, and then displays the following data:
• Smallest number in the array.
• Largest number in the array
• Total numbers in the array.
• Average of numbers in the array.-
. Оссигтепсе оfa mumber
cred by a user.
OOP Lab #10
Using your knowledge in c++. Demonstrate a project that contains a file called "Class Grades.txt", then read
student's names and Grades from the file and store them into separate arrays, and then do the following:
1. Firstly, you create a ID string aray called "names" to store each student name.
2. Secondly, you create a 2D int array "grades" to store student's original quizzes Grades. the array has 7
columns, the original 6 Quizzes Grades must be stored in the following columns : [0,1.2,3,4,5]. Store in the
last column the average of the Grades.
3. Thirdly, Get the grades from the array called "grades", then calculate the average and determine the letter
of that final grade.
Hint: The following functions are required:
1. "PutGrades" to read and save data into both "names" and "grades" arrays.
2. "Grades Average" to calculate each student Grade average, The grades average must be repented as
letters e.g : A>- 90, b>- 80 .. Then find the Maximum and Minimum Grade.
Finally, we calculate average grades of the average column.
3. Use a function called show to display all of the results.
Assume there are exactly 20 students in the class.
**************
******************
*****************
******************
******************
Transcribed Image Text:令ll。 2:38 OOP Lab #10.pdf OOP Lab #10 Use what you have learned about loops, arrays and file stream. Write a C++ program that asks the user for a file name. Presume that the file holds a sequence of numbers, cach of which is written in a separate line. The program must read the contents of the file in an array, and then displays the following data: • Smallest number in the array. • Largest number in the array • Total numbers in the array. • Average of numbers in the array.- . Оссигтепсе оfa mumber cred by a user. OOP Lab #10 Using your knowledge in c++. Demonstrate a project that contains a file called "Class Grades.txt", then read student's names and Grades from the file and store them into separate arrays, and then do the following: 1. Firstly, you create a ID string aray called "names" to store each student name. 2. Secondly, you create a 2D int array "grades" to store student's original quizzes Grades. the array has 7 columns, the original 6 Quizzes Grades must be stored in the following columns : [0,1.2,3,4,5]. Store in the last column the average of the Grades. 3. Thirdly, Get the grades from the array called "grades", then calculate the average and determine the letter of that final grade. Hint: The following functions are required: 1. "PutGrades" to read and save data into both "names" and "grades" arrays. 2. "Grades Average" to calculate each student Grade average, The grades average must be repented as letters e.g : A>- 90, b>- 80 .. Then find the Maximum and Minimum Grade. Finally, we calculate average grades of the average column. 3. Use a function called show to display all of the results. Assume there are exactly 20 students in the class. ************** ****************** ***************** ****************** ******************
Expert Solution
steps

Step by step

Solved in 2 steps with 1 images

Blurred answer
Recommended textbooks for you
Computer Networking: A Top-Down Approach (7th Edi…
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 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)
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
Concepts of Database Management
Computer Engineering
ISBN:
9781337093422
Author:
Joy L. Starks, Philip J. Pratt, Mary Z. Last
Publisher:
Cengage Learning
Prelude to Programming
Prelude to Programming
Computer Engineering
ISBN:
9780133750423
Author:
VENIT, Stewart
Publisher:
Pearson Education
Sc Business Data Communications and Networking, T…
Sc Business Data Communications and Networking, T…
Computer Engineering
ISBN:
9781119368830
Author:
FITZGERALD
Publisher:
WILEY