Question
C++ program: Write a program that can be used to gather statistical data about the number of movies college students see in a month. The
C++ program: Write a program that can be used to gather statistical data about the number of movies college students see in a month. The program should ask the user how many students were surveyed and dynamically allocate an array of that size. The program should then allow the user to enter the number of movies each student has seen. The program should then calculate the average, median, and mode of the values entered.
1. Use the data file below to read the file to find out how many students there are (loop).
2. Create an int array to store the number of movies.
3. Create a string array to hold the names of the students (two arrays will be parallel).
4. Populate the arrays (loop through the file again)
5. Write three different functions to determine the average, median, and mode.
6. Write a function to display the average, median, and mode, and the students name who saw the least amount of movies and the student who saw the most amount of movies.
7. Call all functions from main().
8. Use pointer variables.
9. No global variables are allowed.
10. Please show the screenshot of output.
Data File
Murray Brandl 3
Christal Delamater 4
Zetta Kinlaw 7
Elia Roy 3
Delmer Bibb 4
Joannie Nevers 4
Roselle Gose 10
Jonathan Basnett 0
Marcel Earwood 12
Marina Newton 2
Magdalen Stephan 3
Deane Leach 5
Mariana Crosley 6
Darby Froman 5
Shonda Kyzer 4
Ilana Netto 4
Candida Magnani 1
Laurena Stiverson 2
Elouise Muir 4
Rene Holiday 2
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started