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 builtin function to convert binary string to
decimal value. For example, Integer.parseIntbinaryString To calculate the power values, you can use the
builtin method Math.pow 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 heshe 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 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? Enter the binary number: The binary number you just entered has decimal value Enter the binary number: The binary number you just entered has decimal value The sum is The minimum value is The maximum value is The average is Would you like to try again Y or y for yes y : AM HuskyMap TCSS Autumn page How many binary numbers would you like to enter? Enter the binary number: The binary number you just entered has decimal value Enter the binary number: The binary number you just entered has decimal value Enter the binary number: The binary number you just entered has decimal value The sum is The minimum value is The maximum value is The average is Would you like to try again Y or y for yes n
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
