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.
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...
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.
**************
******************
*****************
******************
******************](/v2/_next/image?url=https%3A%2F%2Fcontent.bartleby.com%2Fqna-images%2Fquestion%2F574819d8-515f-4134-ad28-f73237cd2705%2F81172990-b768-4dba-b66d-3151f8603c40%2Fvqjfstw_processed.jpeg&w=3840&q=75)
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
![](/static/compass_v2/shared-icons/check-mark.png)
This question has been solved!
Explore an expertly crafted, step-by-step solution for a thorough understanding of key concepts.
Step by step
Solved in 2 steps with 1 images
![Blurred answer](/static/compass_v2/solution-images/blurred-answer.jpg)
Recommended textbooks for you
![Computer Networking: A Top-Down Approach (7th Edi…](https://www.bartleby.com/isbn_cover_images/9780133594140/9780133594140_smallCoverImage.gif)
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…](https://www.bartleby.com/isbn_cover_images/9780124077263/9780124077263_smallCoverImage.gif)
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)](https://www.bartleby.com/isbn_cover_images/9781337569330/9781337569330_smallCoverImage.gif)
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…](https://www.bartleby.com/isbn_cover_images/9780133594140/9780133594140_smallCoverImage.gif)
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…](https://www.bartleby.com/isbn_cover_images/9780124077263/9780124077263_smallCoverImage.gif)
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)](https://www.bartleby.com/isbn_cover_images/9781337569330/9781337569330_smallCoverImage.gif)
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](https://www.bartleby.com/isbn_cover_images/9781337093422/9781337093422_smallCoverImage.gif)
Concepts of Database Management
Computer Engineering
ISBN:
9781337093422
Author:
Joy L. Starks, Philip J. Pratt, Mary Z. Last
Publisher:
Cengage Learning
![Prelude to Programming](https://www.bartleby.com/isbn_cover_images/9780133750423/9780133750423_smallCoverImage.jpg)
Prelude to Programming
Computer Engineering
ISBN:
9780133750423
Author:
VENIT, Stewart
Publisher:
Pearson Education
![Sc Business Data Communications and Networking, T…](https://www.bartleby.com/isbn_cover_images/9781119368830/9781119368830_smallCoverImage.gif)
Sc Business Data Communications and Networking, T…
Computer Engineering
ISBN:
9781119368830
Author:
FITZGERALD
Publisher:
WILEY