Question: Your task is to write an interactive program that allows user to enter the information of binary numbers. The program prompts user the amount of

Your task is to write an interactive program that allows user to enter the information of binary numbers. The
program prompts user the amount of binary numbers that is entered. Each binary number is written as string
and converted into decimal value. The task is not allowed to use the built-in function to convert binary string to
decimal value. For example, Integer.parseInt(binaryString,2). To calculate the power values, you can use the
built-in method Math.pow(2, exponentValue). The program stores the sum of all those binary numbers and
produces the statistic information based on those decimal values after the conversions. The required statistical
information includes min, max, sum, average. At the end of the flow, the program asks user if he/she wants to
try the flow again. If the user enters a single character Y or y , the program loop back the process of asking user
to enter the amount of binary numbers, and go on.:
You must name the file Calculator.java that includes exact 4 public static methods as following:
The following is a sample run of the program: (the data in red is what user types). How many binary numbers would you like to enter? 2 Enter the binary number: 11010 The binary number you just entered has decimal value 26 Enter the binary number: 10101 The binary number you just entered has decimal value 21 The sum is 47 The minimum value is 21 The maximum value is 26 The average is 23.5 Would you like to try again [Y or y for yes]? y 12/6/24,11:53 AM HuskyMap - TCSS 142- Autumn 20243.139.236.146//?page=2532/5 How many binary numbers would you like to enter? 3 Enter the binary number: 1100 The binary number you just entered has decimal value 12 Enter the binary number: 11011 The binary number you just entered has decimal value 27 Enter the binary number: 101 The binary number you just entered has decimal value 5 The sum is 44 The minimum value is 5 The maximum value is 27 The average is 14.666666666666666 Would you like to try again [Y or y for yes]? n
Your task is to write an interactive program that

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!