subject

Revise the meanmedian class so that the user can enter any number of values up to 20. if the list has an even number of values, the median is the numeric average of the values in the two middle positions. allow the user to enter to quit entering numbers. import java. util.*; class meanmedian2{public static void main(string[] args){// int[] nums; int num = 0; string entry; string list = "you entered: "; int a, b; int temp; double median; int total = 0; double mean = 0; final int quit = ; int size = 0; for(a = 0; num ! = quit & & a < nums. length; ++a){// your code here}system. out. println("size is " + a); if(num ! = quit)size = nums. length; elsesize = a - 1; system. out. println("size is " + size); system. out. println(list); int comparisonstomake = size - 1; for(a = 0; a < size - 1; ++a){for(b = 0; b < comparisonstomake; ++b){if(nums[b] > nums[b + 1]){temp = nums[b]; nums[b] = nums[b + 1]; nums[b + 1] = temp; }}--comparisonstomake; } // your code heresystem. out. println("the mean is " + mean +" and the median is " + median); }}

ansver
Answers: 2

Other questions on the subject: Computers and Technology

image
Computers and Technology, 22.06.2019 03:00, nsjcbdhcb
Data is processed, stored, and transmitted as a series of 1s and 0s. each 1 or 0 is called a(n) . a series of eight 0s and 1s, called a(n) , represents one character—a letter, number, or punctuation mark. data becomes when it is presented in a format that people can understand and use. digital signals are represented by two different , such as +5 volts and +.2 volts. digital data can also take the form of light and dark spots etched onto the surface of a cd or the positive and negative orientation of particles on the surface of a hard disk. data consists of numbers that might be used in arithmetic operations. it can be represented digitally using the number system. data is composed of letters, symbols, and numerals that are not used in arithmetic operations. computers represent this type of data using , ebcdic, unicode, or utf-8. data is quantified using terms such as or kibibyte (1024 bytes), and prefixes such as or mebi (1,048,576), and giga or (1,073,741,824). to reduce file size and transmission times, digital data can be compressed. compression provides the means to compress data and reconstitute it into its original state. compression throws away some of the original data during the compression process. compressed files usually have at the end of the file name and are represented with special icons. these files have to be or unzipped before you can view the data they contain.
Answers: 1
image
Computers and Technology, 22.06.2019 11:00, terriblexsiren
You receive an email from an impressive-sounding stranger, professor alexander rothschild renard iii, president of the american institute for scientific political statesmen. he urges you to vote for his presidential candidate choice. this social media red flag is known as
Answers: 1
image
Computers and Technology, 22.06.2019 11:30, lindalu
Hassan is writing his master’s thesis, which is a thirty-page document. he received some feedback from his professor in the form of comments, but does not see where the comments are. what is the fastest way for hassan to find the feedback?
Answers: 3
image
Computers and Technology, 22.06.2019 16:10, Olaf2018
Drag each label to the correct location on the imagelist the do’s and don’ts of safeguarding your password. keep yourself loggedin when you leave your computer. don’t write your password down and leave it whereothers can find it. share your password with your friends. each time you visit a website, retain the cookies on your computer. use a long password with mixed characters.
Answers: 1
You know the right answer?
Revise the meanmedian class so that the user can enter any number of values up to 20. if the list ha...

Questions in other subjects: