Design the Java package named as mypack which has following classes and interface: Create an Interface ArithmeticOp. The interface ArithmeticOp has following members: float addition(float a, float b) - add a and b variables float subtraction(float a, float b) - subtract a and b variables. float divide(float a, float b) - divide a and b variables. float multiplication(float a, float b) - multiply a and b variables. Create a class Operation which implement ArithmeticOp interface. The class Operation has following members: float no1 - holds the value of operand 1. float no2 - holds the value of operand 2. float result - holds the value of operation result. Create a class OpTest which has main method. The main method create the reference variable of ArithmeticOp interface and object of Operation class. Using interface reference variable call addition(), subtraction(), divide() and multiplication() methods.
Design the Java package named as mypack which has following classes and
interface:
Create an Interface ArithmeticOp. The interface ArithmeticOp has following
members:
float addition(float a, float b) - add a and b variables
float subtraction(float a, float b) - subtract a and b variables.
float divide(float a, float b) - divide a and b variables.
float multiplication(float a, float b) - multiply a and b variables.
Create a class Operation which implement ArithmeticOp interface. The class
Operation has following members:
float no1 - holds the value of operand 1.
float no2 - holds the value of operand 2.
float result - holds the value of operation result.
Create a class OpTest which has main method. The main method create the
reference variable of ArithmeticOp interface and object of Operation class.
Using interface reference variable call addition(), subtraction(), divide() and
multiplication() methods.
![](/static/compass_v2/shared-icons/check-mark.png)
Step by step
Solved in 2 steps with 1 images
![Blurred answer](/static/compass_v2/solution-images/blurred-answer.jpg)
![Computer Networking: A Top-Down Approach (7th Edi…](https://www.bartleby.com/isbn_cover_images/9780133594140/9780133594140_smallCoverImage.gif)
![Computer Organization and Design MIPS Edition, Fi…](https://www.bartleby.com/isbn_cover_images/9780124077263/9780124077263_smallCoverImage.gif)
![Network+ Guide to Networks (MindTap Course List)](https://www.bartleby.com/isbn_cover_images/9781337569330/9781337569330_smallCoverImage.gif)
![Computer Networking: A Top-Down Approach (7th Edi…](https://www.bartleby.com/isbn_cover_images/9780133594140/9780133594140_smallCoverImage.gif)
![Computer Organization and Design MIPS Edition, Fi…](https://www.bartleby.com/isbn_cover_images/9780124077263/9780124077263_smallCoverImage.gif)
![Network+ Guide to Networks (MindTap Course List)](https://www.bartleby.com/isbn_cover_images/9781337569330/9781337569330_smallCoverImage.gif)
![Concepts of Database Management](https://www.bartleby.com/isbn_cover_images/9781337093422/9781337093422_smallCoverImage.gif)
![Prelude to Programming](https://www.bartleby.com/isbn_cover_images/9780133750423/9780133750423_smallCoverImage.jpg)
![Sc Business Data Communications and Networking, T…](https://www.bartleby.com/isbn_cover_images/9781119368830/9781119368830_smallCoverImage.gif)