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

Business, Finance, Economics, Accounting, Operations Management, Computer Science, Electrical Engineering, Mechanical Engineering, Civil Engineering, Chemical Engineering, Algebra, Precalculus, Statistics and Probabilty, Advanced Math, Physics, Chemistry, Biology, Nursing, Psychology, Certifications, Tests, Prep, and more.
Post Reply
answerhappygod
Site Admin
Posts: 899604
Joined: Mon Aug 02, 2021 8:13 am

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

Post 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!
Join a community of subject matter experts. Register for FREE to view solutions, replies, and use search function. Request answer by replying!
Post Reply