Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

C++, make sure follow all requirements Tokiam Description: The objective of this programming assignment is to practice with pointer syntax At the end of the

C++, make sure follow all requirements
image text in transcribed
image text in transcribed
Tokiam Description: The objective of this programming assignment is to practice with pointer syntax At the end of the semester, you trying to calculate your final grades based on 13 assignments. This program will help you to do so. 1. You need the following variables in main function. const int SIZE - 13; int grades (SIZE); int - pt Data = grades; You are required to use the pointer pt Data as pointer syntax to manipulate the array (not grades array). You are also required to use at least 3 different ways of pointer manipulations to the array. (review class notes) Your program should ask user to enter all data, calculate and display an average, display all values with the same format as sample output and sort all values from smallest to biggest using bubble sort (all functionalities must be implemented with pointer syntax only-le. not grades[0) The following functions are needed: *Use the function header provided below, you may not change the function headers w Function header void getAlldata(int SIZE) pentArray, const int Explanation This function should ask user to enter all values to the array using pintArray as manipulator All assignment grades are between 0 and 100, both O and 100 are acceptable. pIntArray, double getAverage(const int const int SIZE) This function should calculate and return the average to the array using pintArray as manipulator. "No display messages void displayAllValue(const int. pintArray, const int SIZE) This function should display all values of the array using plntArray as manipulator. void bubbleSort(int . const pintArray, const int SIZE) Display all values entered with same output format as shown in the sample output. I used left justified setw(5) for display and 2 values after decimal point for all floating point values This function should sort the array using bubble sort. Sort all values from smallest to biggest. Notice the pointer is a constant pointer. You should also add a swap function. "No display messages Other Specifications: 1. Follow program style guideline very carefully a. Points will be taken off for all violations b. Listed below are some common mistakes, please verify There should be no global constant variables at all. . If you choose to use functions, then all functions must have prototypes i Store all values as variables, do not hardcode any values. 2. Use a line separator to separate blocks of programs. U****103 stars******), line separator comes with a blank line before and after a. Use it before each function definition (if any functions). b. Separate function prototypes and main function definitions (if any functions) c. Between using namespace std;" and function prototypes/main 3. All assignments must be submitted and run as specified to pass the course (see syllabus) 4. Copy and paste your output at the end of your program. Comment out the output lines. 5. Your output format has to match with my output format, including the blank lines. 6. Submit your assignment (cpp only) on worldclassroom before the due date. Sample Output: There are 13 assignments please enter all of them grade 1: 95 grade 2: -95 ! ! !Grades cannot be less than 0 or more than 100 Please re-enter grade 2: 92 grade 3: 103 !!!Grades cannot be less than 0 or more than 100 Please re-enter grade 3: 100 grade 4: 50 grade 5: 75 grade 6: 67 grade 7: 89 grade 8: 0 grade 9: 100 grade 10:25 grade 11: 99 grade 12: 100 grade 13: 100 All grades entered: 95 92 100 50 75 67 890 100 25 99 100 100 The average is: 76.31 The highest grade is: 100 Press any key to continue

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

Introduction To Constraint Databases

Authors: Peter Revesz

1st Edition

1441931554, 978-1441931559

More Books

Students also viewed these Databases questions

Question

I receive useful feedback about my performance.

Answered: 1 week ago

Question

I am encouraged to offer opinions/suggestions.

Answered: 1 week ago