Starting from:

$30

Lab #1 Solution

Class Statistics




For this lab, you will be evaluating the class from assignment 1. To recap, a student's record consists of the following assignments:










Assignments







Indices







1
2
3
4
5
6
7
8
9


Homework
10








Midterm


Homework
Homework
Homework
Homework
Homework
Homework
Homework
Homework
Homework


1
2
3
4
5
Final






















Quiz
Quiz
Quiz
Quiz
Quiz






































0
1
2
3
4
5
6
7
8
9


10
11
12
13
14
15
16







































You will have to complete the following code.




I.




Name:
Sort()




Parameter(s):
oat[] : data
int : size






Return:
nothing




Description:
sorts the elements of data whose size is size in ascending order.







II.




Name:
Maximum()




Parameter(s):
oat[] : data
int : size






Return:
oat




Description:
returns the largest element of data whose size is size.







III.




Name:
Minimum()




Parameter(s):
oat[] : data
int : size






Return:
oat




Description:
returns the smallest element of data whose size is size.







IV.




Name:
Range()




Parameter(s):
oat[] : data
int : size






Return:
oat




Description:
returns the distance between the smallest and largest elements of data whose


size is size.




V.







Name: Median()







Parameter(s):




oat[] : data




int : size






Return: oat







Description: returns the median of elements of data whose size is size. If an ordered list has an odd number of elements, the median is the middle number; otherwise, it is the average of the two middle numbers.










VI.







Name: Mean()






Parameter(s):




oat[] : data




int : size






Return: oat







Description: returns the average of elements of data whose size is size.







VII.







Name: StandardDeviation()






Parameter(s):




oat[] : data




int : size






Return: oat







Description: returns the standard deviation of elements of data whose size is size.







VIII.




Name:
OutlinerCount()




Parameter(s):
oat[] : data
int : size






Return:
oat




Description:
returns the number of elements of data whose size is size that are outliners.


An outliner is a values whose z-score is either less than -2 or greater than 2.







Type
Task
Problem Set








A
I, II, V, VI




B
III, IV, VII, VIII


A
I, VI






B
II, III, IV, V


C
VII, VIII


A
I, III


B
II, VII




C
IV, VIII


D
V, VI

More products