Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Program Description: Statistics is a branch of mathematics dealing with the collection, analysis, interpretation, presentation, and organization of data. In this program, you will be

image text in transcribedimage text in transcribedimage text in transcribedimage text in transcribedimage text in transcribed

Program Description: Statistics is a branch of mathematics dealing with the collection, analysis, interpretation, presentation, and organization of data. In this program, you will be conducting a statistical analysis over populations in major cities. For example, the following table shows all major cities with a population of 250,000 or more in the Midwestern region: To analyze these data, your program should do the following: 1. You need an array with 16 integers (you can also try "long", "unsigned long" or "long long", since population can be a very large number. If you need a different data type, feel free to modify the parameter data types provided below) 2. Have user enter all values, since user may want to analyze a different region 3. Declare a pointer name "ptr", that is initialized to the starting location of the population array const int SIZE = 16; int *ptr; //dynamically allocate an array 4. The program should then find the maximum, average, and display all elements forward and backwards, and sorting (with bubble sort) using three different ways of pointer access 5. Remember, main function should serve as the "driver" to all, so your main function should only declare the variables and call the other functions (occasional cout statements are fine). Functions: Other requirements: 1. You can enter the population data I provided in the table from console. 2. Follow programming style guideline very carefully. a. Points will be taken off for all violations 3. Your output style has to match with my output shown below (although you can try different user input). 4. When accessing array, use only pointer syntax. Do not use array[i], ptr[i], or data[i]. You should only use ptr or * ptr for accessing memory addresses or values. 5. You must demonstrate at least three different ways of using pointer. 6. NO global variables in this assignment 7. All functions must have prototypes. 1. You can enter the population data I provided in the table from console. 2. Follow programming style guideline very carefully. a. Points will be taken off for all violations 3. Your output style has to match with my output shown below (although you can try different user input). 4. When accessing array, use only pointer syntax. Do not use array[i], ptr[i], or data[i]. You should only use ptr or ptr for accessing memory addresses or values. 5. You must demonstrate at least three different ways of using pointer. 6. NO global variables in this assignment 7. All functions must have prototypes. 8. Store all values as variables, do not hardcode any values (for example: size should be saved as a variable). Use constant variables as much as possible 9. Use a line separator between all function definitions. (//****101stars ) 10. All assignments must be submitted and run as specified to pass the course (see syllabus) 11. Copy and paste your output at the end of your program. Comment out the output lines. 12. Submit your program (.cpp only) on world classroom before deadline *Notice* I pressed the tab key between all numerical value entries. The returned line is a result of copy and paste from console to MS word, not because I pressed space bar sometimes and "enter" key some other times

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

Practical Issues In Database Management A Refernce For The Thinking Practitioner

Authors: Fabian Pascal

1st Edition

0201485559, 978-0201485554

More Books

Students also viewed these Databases questions

Question

What are some important characteristics of wise minds?

Answered: 1 week ago