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
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started