Question: JAVA CLASS Create a class called NumberOperatioins and do the following. Have the user be able to enter two integer numbers from the keyboard. Display

JAVA CLASS

Create a class called NumberOperatioins and do the following.

Have the user be able to enter two integer numbers from the keyboard. Display to the user a menu of options that they can choose from to perform an action on these two numbers. For example, if the user entered two integer numbers such as 11 and 3, respectively, display something like the following:

Please select operation type for 11 and 3

- add these two numbers

- subtract the second number from the first number

- multiply both numbers

- integer division (first number / second number)

- floating point division (first number / second number)

- Exit

The user will select one of these actions and then your code will perform the appropriate action using the two numbers and print out the answer. The user will continue to select any of these actions as long as they wish. If the user selects a number that is not valid, then print out an error message but allow the user to select another action. The user will end the program by selecting the number 6 (i.e. Exit). An appropriate error message could be something like this:

***ERROR*** 7 is not a valid selection. Please try again!

Make sure that you import the classes Scanner and JOptionPane, respectively, into your program

Do not forget to prompt the user where appropriate

Create a dialog box from the JOptionPane class and display This program was written by . In this same dialog box also have (on a separate line) the string End of program. Finally, in this same dialog box have a title in the upper left-hand corner that says Goodbye

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!