Question: Write a program that prompts the user if they want to enter a hex string, enter a binary string or exit ( the program will
Write a program that prompts the user if they want to enter a hex string, enter a binary string or exit the program will continue to run until exit is chosen If the user chooses hex string, implement a hexConv method to display the decimal equivalent as well as the binary equivalent and throws a HexFormatException if the string is not a hex string. If the method throws an exception, display "Not a hex number". If the user chooses binary string, implement a BinConv method to display the decimal equivalent as well as the hexadecimal equivalent and throws a BinFormatException if the string is not a binary string. If the method throws an exception, display "Not a binary number". If the user chooses exit, end your program with an appropriate print statement. All data output to the screen should also be output to a file named NumbersOutput If the user chooses something else, handle it with an appropriate statement and force correct input. You should be using methods as needed and not using global variables. Name your file IOPPyourlastname. Submit your Java file AND output file to DL
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
