computer
CS151- Lab Four Wiemann
Requirements: 1) Create a C++ Program to convert binary to decimal, decimal to binary,
decimal to hexadecimal, and hexadecimal to decimal. 2) When the program is first executed a menu, similar in design, should be
displayed to the user: Michael Wiemann’s Conversion Program
------------------------------------
1) Convert Binary to Decimal 2) Convert Decimal to Binary 3) Convert Decimal to Hexadecimal 4) Convert Hexadecimal to Decimal 5) Exit Program
Input Choice:
3) The user should be prompted for the input of a choice. If the choice ‘1’ through ‘4’ is selected, then the appropriate input and output should occur for that option. If the user selects ‘5’, the program should be terminated, otherwise an error message should be displayed to the user. The program should continue to display the menu until the user types the value of ‘5’ as his/her choice.
4) You are required to use a function/method to create the menu interface. 5) You are required to use a function/method or a collection of
functions/methods to calculate each menu option. 6) Validation of input must occur on the input of the typed data (i.e. ‘12B’ is not
a valid decimal value). An error message should be displayed to the end user if the required menu option is not valid.
7) All shop standards are to be followed as instructed in class. 8) The output listed above must be mathematically correct, however, formatting
of the numbers with the decimal places and right justification is not required. 9) Save the source code as “mrwJavaProg04.java”. 10) You will submit the Java file to the Dropbox for this lab assignment on or
before the due date.