Page 1 of 1

1. The class Shapes includes two void methods: calcTriangleArea()and calcTrianglePerimeter( ). The calcTriangleArea()met

Posted: Sat May 14, 2022 2:43 pm
by answerhappygod
1. The class Shapes includes two void methods:
calcTriangleArea()and calcTrianglePerimeter(
). The calcTriangleArea()method takes two int parameters (base and
height), calculates the
area of a triangle, and assigns the value to a private
instance variable (area). The
calcTrianglePerimeter()method takes three int parameters
(lengthSide1, lengthSide2, and
lengthSide3), calculates the perimeter of a triangle, and assigns
the value to a private instance
variable (perimeter). The Shapes class also includes two getter
methods, which return the
calculated values. The Shapes class implements the Calculatable
interface.
Write the Shapes class and the Calculatable
interface.
2. Write an abstract method convertMinutes() that takes
minutes as an int parameter and returns a double
value.
3. Write an abstract method convertInches() that takes
inches as an int parameter and returns a double value.
Thank you!