Create a class file MathOP.java under c:myjava folder....

Create a class file MathOP.java under c:myjava folder.

You need to create the following methods

1) MathAdd: to add two numbers

2) MathSub: to subtract two numbers

Instructions

1) Make sure that you create all the necessary elements for the class, such as attributes, constructor.

2) Make sure that each method accepts and return the correct data type

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

4) Add comments and flowerbox to all your programs

        /************************

         This is a flower box

         Name:

         Program name:

         Date:

         Purpose:

       **************************/

 

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)?

 

Make sure that you include all source codes and the compiled codes into W3_firstname_lastname.zip.
Powered by