DEVRY COMP 122 Lab 7 Lab Report and Source Code
DEVRYCOMP 122 Lab 5 Lab Report and Source Code
DEVRY COMP 220 Entire Course
DEVRY COMP 220 iLab 1 Two
DEVRY COMP 220 iLab 2 Resistor Lab Report and Sour…
DEVRY COMP 220 iLab 3 Bank Account Lab Report and…
DEVRY COMP 220 iLab 4 Composition Lab Report and S…
DEVRY COMP 220 iLab 5 Lab Report and Source Code
DEVRY COMP 220 iLab 6 Overloaded Operators Lab Rep…
DEVRY COMP 220 iLab 7 Polymorphism Lab Report and…
UOP CRT 205 Entire Course
UOP CRT 205 Week 1 Assignment Supporting a Positio…
UOP CRT 205 Week 1 CheckPoint Taking a Position
UOP CRT 205 Week 2 DQ 1 And DQ 2
UOP CRT 205 Week 2 Exercise Review Quizzes
UOP CRT 205 Week 3 Assignment Analyzing Credibilit…
UOP CRT 205 Week 3 CheckPoint Argument Credibility
UOP CRT 205 Week 4 DQ 1 And DQ 2
DEVRY COMP 122 Lab 4 Lab Report and Source Code
DEVRY COMP 122 Lab 3 Lab Report and Source Code
DEVRY COMP 122 Lab 2 Lab Report and Source Code
DEVRY COMP 122 Lab 1 Lab Report and Source Code
DEVRY COMP 122 Entire Course
DEVRY COMP 220 iLab 7 Polymorphism Lab Report and…
DEVRY COMP 220 iLab 6 Overloaded Operators Lab Rep…
DEVRY COMP 220 iLab 5 Lab Report and Source Code
DEVRY COMP 220 iLab 4 Composition Lab Report and S…
DEVRY COMP 220 iLab 3 Bank Account Lab Report and…
DEVRY COMP 220 iLab 2 Resistor Lab Report and Sour…
DEVRY COMP 220 iLab 1 Two
DEVRY COMP 220 Entire Course
ASH CJA 303 What Justice Means to Me
ASH CJA 303 Week 5 Quiz
ASH CJA 303 Week 5 Police and Police Issues
ASH CJA 303 Week 5 Discussion Questions
Keywords
Authorizations, license

Visible by: Everyone 
All rights reserved

3 visits
DEVRY COMP 122 Lab 6 Lab Report and Source Code
This doc cannot be viewed.
DEVRY COMP 122 Lab 6 Lab Report and Source Code
Check this A+ tutorial guideline at
www.assignmentclick.com/comp122/comp122lab6labreportandsourcecode
For more classes visit
www.assignmentclick.com
COMP 122 Week 6 iLab
You are to design a program that will allow some number of grades (up to a max of 100) to be input by the user. After the data has been collected, your program should calculate and output the mean and median of the collected data, as well as the sorted grade information.
Design Constraints
Use an integer constant of 100 to specify the number of elements in the array you will use to collect the grade information. Do not use any global variables in your program. Declare any arrays you need in your main function and pass the arrays as needed into the functions described below. The main function is the only function permitted to do any output to the console!!! Do not do cout operations inside of any other function.
Your data collection loop in your main function must allow the user to enter less than 100 grades. It must also make sure that the user does not try to enter more than 100 grades. Each data value entered should be checked to make sure it is between 0 and 100. Any other value entered should be considered invalid and ignored (ie. not counted as a valid input and not stored in an array). Once the data is collected, the array and the number of grades collected must be passed to a function called mean. The mean function must loop through the values in the array, summing them together.
The result of the function is the sum divided by the number of grades collected. The result must be returned from the mean function to the main function, where is it output in an appropriate manner (two digits after the decimal point). The main function should then pass the array and the number of grades collected to the median function. The median of a set of numbers is the number in the set where half the numbers are above it and half the numbers are below it. In order to find the median, this function will need to sort the original data. The simplest sorting procedure is called bubble sorting. The following pseudocode describes bubble sorting for X valid array elements.
for ; outer
for ; inner
if array[inner] > array[inner+1]
swap(array[inner], array[inner+1]);
After the data has been sorted, the median value can be found. If the array has an odd number of elements the median is the value of the middle element (Hint: arraySize/2 is the middle element). If the array has an even number of elements then the median is the average of the middle two elements (Hint: arraySize/2 and ( arraySize/2)  1 are the two middle elements). The median value should be returned by the median function. The main routine should output the median value in an appropriate manner. The main routine should also output the sorted array with 5 grades per line.
Carefully develop test cases for your program. Most of your test cases do not need to contain lots of values. Make sure to include incorrect inputs such as negative grade values. Calculate what your mean and median values should be for your test cases. Document your test cases in a Word document. Run your test cases with your program to see if your program generates the expected output. If not, troubleshoot your program and fix the problem. When your program executes a test case correctly, take a screen shot of the program output and paste it into your Word document to prove that your test case executed correctly with your program. Make sure that your code is properly formatted! You also need to make sure you include a comment block for each function which documents the purpose, inputs, and outputs of each function!
Create a program using Visual C++.Net. Make sure to capture a screen shot of your program running your test cases! The best way to do this is to click on the console window you want to capture and then press the Alt and PrintScreen keys at the same time. Then paste your captured screen image into your Word document. Your Word document should contain your test cases, the screen shots doc
Check this A+ tutorial guideline at
www.assignmentclick.com/comp122/comp122lab6labreportandsourcecode
For more classes visit
www.assignmentclick.com
COMP 122 Week 6 iLab
You are to design a program that will allow some number of grades (up to a max of 100) to be input by the user. After the data has been collected, your program should calculate and output the mean and median of the collected data, as well as the sorted grade information.
Design Constraints
Use an integer constant of 100 to specify the number of elements in the array you will use to collect the grade information. Do not use any global variables in your program. Declare any arrays you need in your main function and pass the arrays as needed into the functions described below. The main function is the only function permitted to do any output to the console!!! Do not do cout operations inside of any other function.
Your data collection loop in your main function must allow the user to enter less than 100 grades. It must also make sure that the user does not try to enter more than 100 grades. Each data value entered should be checked to make sure it is between 0 and 100. Any other value entered should be considered invalid and ignored (ie. not counted as a valid input and not stored in an array). Once the data is collected, the array and the number of grades collected must be passed to a function called mean. The mean function must loop through the values in the array, summing them together.
The result of the function is the sum divided by the number of grades collected. The result must be returned from the mean function to the main function, where is it output in an appropriate manner (two digits after the decimal point). The main function should then pass the array and the number of grades collected to the median function. The median of a set of numbers is the number in the set where half the numbers are above it and half the numbers are below it. In order to find the median, this function will need to sort the original data. The simplest sorting procedure is called bubble sorting. The following pseudocode describes bubble sorting for X valid array elements.
for ; outer
for ; inner
if array[inner] > array[inner+1]
swap(array[inner], array[inner+1]);
After the data has been sorted, the median value can be found. If the array has an odd number of elements the median is the value of the middle element (Hint: arraySize/2 is the middle element). If the array has an even number of elements then the median is the average of the middle two elements (Hint: arraySize/2 and ( arraySize/2)  1 are the two middle elements). The median value should be returned by the median function. The main routine should output the median value in an appropriate manner. The main routine should also output the sorted array with 5 grades per line.
Carefully develop test cases for your program. Most of your test cases do not need to contain lots of values. Make sure to include incorrect inputs such as negative grade values. Calculate what your mean and median values should be for your test cases. Document your test cases in a Word document. Run your test cases with your program to see if your program generates the expected output. If not, troubleshoot your program and fix the problem. When your program executes a test case correctly, take a screen shot of the program output and paste it into your Word document to prove that your test case executed correctly with your program. Make sure that your code is properly formatted! You also need to make sure you include a comment block for each function which documents the purpose, inputs, and outputs of each function!
Create a program using Visual C++.Net. Make sure to capture a screen shot of your program running your test cases! The best way to do this is to click on the console window you want to capture and then press the Alt and PrintScreen keys at the same time. Then paste your captured screen image into your Word document. Your Word document should contain your test cases, the screen shots doc
 Keyboard shortcuts:
RSS feed Subscribe to comments on this doc.  Latest comments
 ipernity © 20072017

Help & Contact

The ipernity Team blog

About ipernity

Thanks!

The ipernity Club
Guide of good conduct  Group guidelines  Privacy Policy  Terms of service
ipernity for iPhone / iPad new  ipernity for Android new  Developers space 
Facebook
Google +
Twitter  Find us on:
 Language
 English
Please signin to write a comment.