Question: Create a new class MathOP2 (MathOP2.java) that Inherits from MathOP You need to add multiply method and divide method, both methods accepts two parameters and

Create a new class MathOP2 (MathOP2.java) that Inherits from MathOP

You need to add multiply method and divide method, both methods accepts two parameters and return a value.

Create a test program with documentation to test all operators (at least 4)

3) Create a program TestMathOP.java under c:\myjava folder to test the class.

The TestMathOP should do the following:

Enter the First number >> 5.5

Enter the Second Number >> 7.5

The sum of the numbers is 13

The subtract of the two numbers is -2.00

Do you want to exist (Y/N)?

// If Yes print "Thanks for using our system"

// If No run the program again

5) Modify the code to prompt you for the operation so it will look like this

Enter the First number >> 5.5

Enter the Second Number >> 7.5

Enter operator >>+

The answer is 13

Do you want another operation (Y/N)?

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!