Use functions to get a list of integers from a user

Assignment Help Basic Computer Science
Reference no: EM13700357

Use functions to get a list of integers from a user and then find statistics of the given list of integers. You are not allowed to use any built in functions for finding the calculations in this assignment.

The functions required for this assignment will be:

printMenu()-Prints a menu of options to the screen
getList()-Gets list of integers from user using a while loop and returns the list
getMean(userList)-Returns the average of the integers contained in the list given by the user
getMedian(userList)-Returns the median of the integers contained in the list given by the user
printGraph(userList)-Prints a horizontal histogram of the elements in the list
getMin(userList)-Finds the lowest value in the set using a for loop and then prints value to screen
getMax(userList)-Returns the highest value in the set using a for loop
Example output:

Welcome to the List Statistics Calculator
To begin, enter a list of integers or to end the list!
Enter an integer: 67
Enter an integer: 100
Enter an integer: 50
Enter an integer: 100
Enter an integer: 50
Enter an integer: 50
Enter an integer: 60
Enter an integer: q
Please choose the statistic that you would like to calculate!
1. Mean
2. Median
3. Min
4. Max
5. Graph
Please enter your choice, or 0 to exit: 1
The mean of this data set is 68.142
Please choose the statistic that you would like to calculate!
1. Mean
2. Median
3. Min
4. Max
5. Graph
Please enter your choice, or 0 to exit: 2
The median of this data set is 60
Please choose the statistic that you would like to calculate!
1. Mean
2. Median
3. Min
4. Max
5. Graph
Please enter your choice to exit:3
The max of this data set is 100
Please choose the statistic that you would like to calculate!
1. Mean
2. Median
3. Min
4. Max
5. Graph
Please enter your choice, or 0 to exit: 4
The min of this data set is 50
Please choose the statistic that you would like to calculate!
1. Mean
2. Median
3. Min
4. Max
5. Graph
Please enter your choice to exit: 5
50: X X X
60: X
67: X
100: X X
Please enter your choice to exit: 0

Reference no: EM13700357

Virtual reality platform

The video about VR and Facebook includes a discussion that virtual reality platform will be a future human computer interface. In terms of user experience, how would you env

Specify a list of installation sources

This enables you to retrieve the required files from a removable disk or from an image file on the local network. You can also use Group Policy to specify a list of installa

Discuss the vulnerabilities associated with four

Discuss the vulnerabilities associated with four of the ten networks described in your readings. Make sure you identify the network, potential vulnerabilities, and what the

Internet user is a college graduate

(a) What is the probability that a California adult is an internet user, given that he or she is a college graduate? Round your answer to decimal places. (b) Among Califor

The user to enter the replacement cost of a building

Design a modular program that asks the user to enter the replacement cost of a building and than displays the minimum amount of insurance he or she should but for the pro

Define a class arrayset that represents a set

Define a class ArraySet that represents a set and implements the interface described in Project 1a of the previous chapter. Use the class ResizableArrayBag in your implement

Instances of attribute minimization

Describe attribute minimization. Explain what would happen if you tried to validate a page containing instances of attribute minimization. Propose a solution to this problem

Explain differences between ipv4 and ipv6

Write the memo to Mary Jane Newman, communications manager for Beautivision. When preparing the memo, keep in mind that Ms. Newman has some knowledge of information technolo

Reviews

Write a Review

 
Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd