subject

C++ You should attempt this assignment after we cover using pointers with arrays and dynamic memory allocation. There is a tutorial for this assignment since it is the first time we are using pointers
Note: You must use pointer /offset notation in this assignment instead of array notation. For example:
If you have an array named a, to access it content under subscript 3, you must write:
*(a + 3) instead of a[3]. Please note that points will be deducted if this requirements is not followed.
Movie Statistics
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:
1. Ask the user how many students were surveyed. An array of integers with this many elements should then be dynamically allocated.
2. Allow the user to enter the number of movies each student saw into the array.
3. Calculate and display the average, median, and mode of the values entered. Input validation: Do not accept negative numbers for input:
Median Function
In statistics, when a set of values is sorted in ascending and 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. The function should accept an array of integers and the size of the array. The median value should be returned as a double.
To demonstrate your pointer powers, use pointer notation instead array notation in this function.
Mode Function In statistics
The mode of set of values is the value that occurs most often or with the greatest frequency. This function should accept an array of integers and the size of the array (integer). The function should determine 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.
Average Function
We have written functions like that before. It should return a double value that is the average of the array elements. To demonstrate your pointer powers, use pointer notation instead array notation in this function.

ansver
Answers: 1

Another question on Computers and Technology

question
Computers and Technology, 22.06.2019 07:50
In this lab, you complete a prewritten c++ program for a carpenter who creates personalized house signs. the program is supposed to compute the price of any sign a customer orders, based on the following facts: the charge for all signs is a minimum of $35.00. the first five letters or numbers are included in the minimum charge; there is a $4 charge for each additional character. if the sign is made of oak, add $20.00. no charge is added for pine. black or white characters are included in the minimum charge; there is an additional $15 charge for gold-leaf lettering. instructions ensure the file named housesign.cppis open in the code editor. you need to declare variables for the following, and initialize them where specified: a variable for the cost of the sign initialized to 0.00 (charge). a variable for the number of characters initialized to 8 (numchars). a variable for the color of the characters initialized to "gold" (color). a variable for the wood type initialized to "oak" (woodtype). write the rest of the program using assignment statements and ifstatements as appropriate. the output statements are written for you. execute the program by clicking the run button. your output should be: the charge for this sign is $82. this is the code, // housesign.cpp - this program calculates prices for custom made signs. #include #include using namespace std; int main() { // this is the work done in the housekeeping() function // declare and initialize variables here // charge for this sign // color of characters in sign // number of characters in sign // type of wood // this is the work done in the detailloop() function // write assignment and if statements here // this is the work done in the endofjob() function // output charge for this sign cout < < "the charge for this sign is $" < < charge < < endl; return(0); }
Answers: 1
question
Computers and Technology, 22.06.2019 17:00
Your computer running windows 10 is doing some very strange things with the operating system. you are fairly certain it is not a hardware issue. you need to try to get further insight into what is going on within the operating system. which tool would be best suited for this?
Answers: 2
question
Computers and Technology, 23.06.2019 06:30
On early television stations, what typically filled the screen from around 11pm until 6am? test dummies test patterns tests testing colors
Answers: 1
question
Computers and Technology, 23.06.2019 06:40
How many nibbles can be stored in a 16-bit word?
Answers: 1
You know the right answer?
C++ You should attempt this assignment after we cover using pointers with arrays and dynamic memory...
Questions
Questions on the website: 13722367