Question: Java code please... In both add() and divide() assert the following conditions on the input parameters to the methods: In add() n1 and n2 are

Java code please...

Java code please... In both add() and divide() assert the following conditions

In both add() and divide() assert the following conditions on the input parameters to the methods: In add() n1 and n2 are both positive numbers In divide(): n2 is not zero For each assertion include a string in the assertion that describes the error being asserted. In the divide() method, exit the program after the assertion. In the add() method, allow the program to continue running after the assertion. Run your program and test triggering one of the assertions. Your submission will consist of three things: 1) Source code file/s (not a screenshot). 2) Screenshot of Eclipse showing output of program

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!