Question: Java Programming Create an interface Perimeter with methods a. double SquarePerimeter(double side) b. double RectanglePerimeter(double len, double wid) c. double CircleCircumference(double radius) d. double TrianglePerimeter(double

Java Programming
Java Programming Create an interface Perimeter with methods a. double SquarePerimeter(double side)

Create an interface Perimeter with methods a. double SquarePerimeter(double side) b. double RectanglePerimeter(double len, double wid) c. double CircleCircumference(double radius) d. double TrianglePerimeter(double side1, double side2, double side3) Create a class ShapePerimeter. The class implements the Perimeter interface. Now each method calculate and return the perimeter of its shape. The formulae to calculate perimeter of each shape is given below: Perimeter of Square: 4 * side Perimeter of Rectangle: 2 * (length + width) Circumference of Circle: 2 * PI * radius Perimeter of Triangle: side 1 + side 2 + side 3 Each method ask the user to enter the values to calculate the perimeter Create TestShape class with main and do the following: - Create an object of ShapePerimeter class, call the all the perimeter methods and display the results

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!