Answered step by step
Verified Expert Solution
Question
1 Approved Answer
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
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
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