Question: please do it with JAVA Display a prompt asking if the user wishes to convert from decimal, binary, or hexadecimal or if they want to

please do it with JAVA

Display a prompt asking if the user wishes to convert from decimal, binary, or hexadecimal or if they want to quit.

The user will enter D, B, H, or Q . Any other input will display an error message.

The user will then be prompted for a number in their selected base.

The program will then display the number in decimal, hexadecimal, and binary format.

The program will go back to step 1 and start the process all over again, until the user selects quit.

Upon exit, the program will thank the user.

A sample run of this program is below:

Convert from (H)exadecimal, (B)inary, (D)ecimal, or (Q)uit? H Enter Number: DEAD DEC: 57005 HEX: DEAD BIN: 1101111010101101 Convert from (H)exadecimal, (B)inary, (D)ecimal, or (Q)uit? B Enter Number: 101010 DEC: 42 HEX: 2A BIN: 101010 Convert from (H)exadecimal, (B)inary, (D)ecimal, or (Q)uit? D Enter Number: 65535 DEC: 65535 HEX: FFFF BIN: 1111111111111111 Convert from (H)exadecimal, (B)inary, (D)ecimal, or (Q)uit? L Invalid choice, please try again. Convert from (H)exadecimal, (B)inary, (D)ecimal, or (Q)uit? Q Thank you for using the number converter.

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!