85 File Page 1 of 1 Home Insert Design 293 words 92°F Sunny Layout References I I Ch 10 B Lab Instructions (1) (1) (Prot

Business, Finance, Economics, Accounting, Operations Management, Computer Science, Electrical Engineering, Mechanical Engineering, Civil Engineering, Chemical Engineering, Algebra, Precalculus, Statistics and Probabilty, Advanced Math, Physics, Chemistry, Biology, Nursing, Psychology, Certifications, Tests, Prep, and more.
Post Reply
answerhappygod
Site Admin
Posts: 899603
Joined: Mon Aug 02, 2021 8:13 am

85 File Page 1 of 1 Home Insert Design 293 words 92°F Sunny Layout References I I Ch 10 B Lab Instructions (1) (1) (Prot

Post by answerhappygod »

85 File Page 1 Of 1 Home Insert Design 293 Words 92 F Sunny Layout References I I Ch 10 B Lab Instructions 1 1 Prot 1
85 File Page 1 Of 1 Home Insert Design 293 Words 92 F Sunny Layout References I I Ch 10 B Lab Instructions 1 1 Prot 1 (147.39 KiB) Viewed 32 times
This is a C++ lab, plz make sure it runs, and also please makesure it follows the requirements in the bottom.
85 File Page 1 of 1 Home Insert Design 293 words 92°F Sunny Layout References I I Ch 10 B Lab Instructions (1) (1) (Protected View) - Word (Unlicensed Product) Tell me what you want to do Mailings Review View Help Write a program that will 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 then should allow the user to enter the number of movies each student has seen. It should then sort the scores and calculate the average. Modularity: Main: The main function should accept the number of students from the user and dynamically create an array large enough to contain number of movies watched for each student. Input validation: The number of students should be a positive integer. Print the average and free the allocated array when complete. Get the data. This function should get the number of movies watched by each college student. Input validation: The number of movies should be a positive integer. Sort the data. This function should sort the array in ascending order. Note you may use the Standard Template Library sort function or your own sort function. To use the STL sort: Add #include <algorithm> to your program sort (arrayname, arrayname + size of array) (beginning and ending elements) Display: This function should display the sorted list of the number of movies watched. Average: This function should be a value-returning function that calculates the average of the movies watched and returns it to the main function. Sample Output: 0 Number of Movies Watched. 75 81 88 Average 81.3 Requirements: Your array must be dynamically allocated. In passing your array to functions, you must declare the array parameter using pointer notation instead of array notation, and inside each function you must use pointer notation instead of array notation to access the array elements. CLO O [email protected] W F 4) D x Share + 83% 10:48 AM 7/11/2022 1
Join a community of subject matter experts. Register for FREE to view solutions, replies, and use search function. Request answer by replying!
Post Reply