Question: Write a program that calculates the quotient of integer division. Specification Follow this sequence: 1.Get two integers from the keyboard. 2.Pass both integers to a

Write a program that calculates the quotient of integer division.

Specification

Follow this sequence:

1.Get two integers from the keyboard.

2.Pass both integers to a method that calculates and returns the quotient.

3.Display the quotient.

Implement exception handling:

1.Catch an NumberFormatException if thrown.

2.Catch an ArithmeticException (divide by zero) if thrown.

3.Allow the user to re-enter the integers if either exception is thrown.

4.Use JOptionPane dialogs for input/output.

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!