Question: Write a java method that gives the user a choice to enter one to convert from binary to decimal then display the result, enter number

Write a java method that gives the user a choice to enter one to convert from binary to decimal then display the result, enter number two to convert from decimal to binary then display the result. the program should stop if the user enters the choice zero

For Example: (110)2 = (6)10(22 *1)+ (21 *1) + (20*0) = 6

please using function method and switch statement without array or string or bin method also

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 Databases Questions!