Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

This assignment is to demonstrate the use of FUNCTIONS and ARRAYS . Write a prog

ID: 3679008 • Letter: T

Question

This assignment is to demonstrate the use of FUNCTIONS and ARRAYS.

Write a program that meets the following requirements:

1. Read in a maximum of 50 records, each record will be on a separate line using columns one and two.

           Example:

           36

           O1

           5H

       

2. Determine if each record is a positive integer. Keep track of all records that are not positive integers and print a list of them.

For all the positive integer data records:

3. Determine the average (mean) rounded to the nearest whole number, median, mode and standard deviation.

4. Compute the difference between each of the positive integers and the mean and store the difference in an array corresponding to the original integer number.

5. Determine which of the integers deviate’s the most from the mean, print the number and how much it deviates.

6. Print the original list of integers along side the list of integers sorted from the lowest to the highest.

7. Print a bar graph indicating how much each integer deviates from the mean. Use the sorted list of integers to develop the graph.

8. Label and print all of the above findings.

Your program must have separate functions to determine each of the following: mean, median, mode, standard deviation, reading of the original data, printing of the invalid records, printing of the valid records, number 6 and 7 above.

Your program will have its final test with the integers from the data file data6.txt.

Demonstrate your output in lab.

Submit your source code and algorithm or flowchart in blackboard.

All values must be clearly labeled in the output.

You are required to demonstrate your output in Lab.

Documentation will be 20% of your grade.

Your source code must contain the following documentation.

Header information: (Source Code and Output)

        Your Name, course & section number, assignment number and due date.

A brief description of your assignment.

Variable dictionary: A brief description of every variable used in your program.

Comments related to input and output of data and all formulas used in your code.

Below is the shell used for the assignment

Explanation / Answer

#include #include using namespace std; void heading(); void averagepaid(); int main() { int counter = 0, idno = 0; double income = 0.0, tax = 0.0; ifstream f1 ("h:\fall 2014\irsdata.txt",ios::in); heading(); while (f1>>idno>>income>>tax, !f1.eof()) { counter++; cout
Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote