Question: Object oriented programming - Java I posted this question once already but an expert answered it incomplete. The program should be exactly like the shown
Object oriented programming - Java
I posted this question once already but an expert answered it incomplete. The program should be exactly like the shown JFrame please.

1) Create a frame as follows: x Calculator Enter Numarator Enter Denominator Result CALCULATE CLEAR There are 3 labels, 2 textfields, 2 buttons and 1 textarea. If user fills the fields and clicks on calculate button, write a calculate() method to calculate the result of the operation. If the user makes a mistake, the program catches and handles the exception. If the user enters a zero denominator, an ArithmeticException occurs. If the user enters a string as a denominator, NumberFormatException occurs. If user clicks on "Clear" button all the fields should be cleared. For each exception, the user is informed of the mistake and asked to try again as in the following figures: a) Write try, catch in action of Calculate button. b) Write try, catch inside the method. Calculator X Calculator Enter Numarator 10 Enter Numarator 10 Enter Denominator hello Enter Denominator Result Result CALCULATE Exception:java.lang.NumberFormatException: For input string: "hello" You must enter integers. Please try again. CALCULATE Exception:java.lang. ArithmeticException: / by zero Zero is an invalid denominator. Please try again CLEAR CLEAR Calculator Enter Numarator 10 Enter Denominator 2 MA Result Result: 10/2 = 5 CALCULATE CLEAR
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
