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

Another question on Computers and Technology

question
Computers and Technology, 21.06.2019 15:00
Much has been made of the new web 2.0 phenomenon, including social networking sites and user-created mash-ups. how does web 2.0 change security for the internet? how do secure software development concepts support protecting applications?
Answers: 1
question
Computers and Technology, 22.06.2019 22:30
You are new to microsoft certification and want to start out by getting a certification geared around windows 8. what microsoft certification should you pursue?
Answers: 1
question
Computers and Technology, 23.06.2019 18:50
What is transmission control protocol/internet protocol (tcp/ip)? software that prevents direct communication between a sending and receiving computer and is used to monitor packets for security reasons a standard that specifies the format of data as well as the rules to be followed during transmission a simple network protocol that allows the transfer of files between two computers on the internet a standard internet protocol that provides the technical foundation for the public internet as well as for large numbers of private networks
Answers: 2
question
Computers and Technology, 24.06.2019 05:30
Cómo pongo un tomo de llamada sin pagar?
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
question
Social Studies, 18.03.2021 02:10
question
Mathematics, 18.03.2021 02:10
Questions on the website: 13722361