Question: In C++ Language. Please follow the Instructions!!! (Making up Data) Thumbs up good answers. #include 2 using namespace std; 4 IFunction prototypes here 6 int

In C++ Language. Please follow the Instructions!!! (Making up Data)

Thumbs up good answers.

In C++ Language. Please follow the Instructions!!! (Making up Data) Thumbs upgood answers. #include 2 using namespace std; 4 IFunction prototypes here 6int mainO t 8 Ihere ask the user how many students were

#include 2 using namespace std; 4 IFunction prototypes here 6 int mainO t 8 Ihere ask the user how many students were surveyed 10 11 Ihere use functions to implement Movie Stat problem 12 13 14 Ioutput results here 15 16 17 I delete array here 18 19 20 21 22 7/Function code here Mode Function In statistics, the mode of a set of values is the value that occurs most often or with the greatest frequency. Write a function that accepts as arguments the following: A) An integer pointer to the starting address of an array of integers B) An integer that indicates the number of elements in the array The function should determine and return the mode of the array. That is, it should determine which value in the array occurs most often. The mode is the value the function should return. If the array has no mode (none of the values occur more than once), the function should return-1. (Assume the array will always contain non-negative values.) Median Function In statistics, when a set of values is sorted in ascending or descending order, its median is the middle value. If the set contains an even number of values, the median is the mean, or average, of the two middle values. Write a function that accepts as arguments the following: A) An integer pointer to the starting address of an array of integers B) An integer that indicates the number of elements in the array The function should determine and return the median of the array. This value should be returned as a float. (Note. You will need to sort the array.) Mean Function In statistics, the mean is the average value of a set of numbers. Write a function that accepts as arguments the following: A) An integer pointer to the starting address of an array of integers B) An integer that indicates the number of elements in the array The function should determine and return the mean of the array. This value should be returned as a float. Get Data Function This function will return a pointer to the starting address of an array of integers. The input to function is an integer of the size of array to created. Inside the function, based on the desired size of the array, an array of integers with this many elements should then be dynamically allocated. Allow the user to enter (only) positive numbers into this array . Print Array Function Create a function that prints out the values of an integer array The 1st input to the function is the starting address of an integer array . The 2nd input to the function is the size of the array Problem Statement: Using the above functions implement the following Movie Stat problem. 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 perform the following steps: A) Ask the user how many students were surveyed. An array of integers with this many elements should then be dynamically allocated. B) Allow the user to enter the number of movies each student saw into the array C) Calculate and display the mean, median, and mode of the values entered. Input Validation: Do not accept negative numbers for input. Pointers: Use pointer notation will all arrays Sample Input 1 18 21 11 21 15 19 17 21 17 Sample Output 2: Data: 21 21 21 19 18 17 17 15 11 Mean: 17.7778 Median: 18 Mode: 21 Sample Input 2: 46 7 2 Sample Output 3: Data: 7 6 4 2 Mean: 4.75 Median: 5 Mode: -1

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!