Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Please answer the following question using C++ programming. Software: visual studios community 2017. Thank you! IMSE255/CIS205 Homework Assignment 6 After the class on Chapter 10

Please answer the following question using C++ programming. Software: visual studios community 2017. Thank you!
image text in transcribed
image text in transcribed
IMSE255/CIS205 Homework Assignment 6 After the class on Chapter 10 Answer the questions or write programs to solve problems in the exercise after the corresponding chapter. Refer to the examples in our lectures and textbook. Choose appropriate data type and program structure. Writing comments in each program that helps you solve problems. Note: Fully test and debug your program. Write some comments following the examples in chapters. 1. Chapter 10 (pg. 702) Programming Challenge 7- Movie Statistics (Modified) Write a program that can be used to gather statistical data about the number of movies collage students see in a month. The program should ask 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 and the median of the values entered. You must have following functions in Function void getMovieCounts(int "movieCounts, int studentCount) Description Function asks user to enter number of watched movies for each student and stores the value in movieCounts array Get number of watched movies for each student via function Function asks user to enter a positive number sitiveNumber int getPositiveNumber() If non-positive number is entered user must be asked again the positive number is entered. If positive number is entered, that value is returned. double getAvgMovieCount (const int constFunction calculates and returns the average movieCounts, int studentCount) value from movieCounts arra double getAvgMovieCount(const int constFunction calculates and returns the median movieCounts, int studentCount) value from movieCounts arra 2. Chapter 10 (pg. 702) Programming Challenge 7-Movie Statisties Class (Modified) Modify your code from problem to use class. Create class MovieStat. The constructor of Moviestat class should ask user how many students were surveyed and dvnamically allocate an array of that size. While the destructor must free the allocated data

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

More Books

Students also viewed these Databases questions