In the file Area. java, we have provided code for the Shape interface and 4 classes that implement Shape. Your task will
Posted: Mon Jun 06, 2022 4:57 pm
This is a basic interface task, can anyone help me in java
to finish setting up these methods? Thanks!
In the file Area. java, we have provided code for the Shape interface and 4 classes that implement Shape. Your task will be to add a findArea() method to the Shape interface and implement it in all 4 classes. The 4 classes are: Square, Circle, Triangle and Trapezoid For all the findArea () methods, please return a double that represents the area of the shape. If you are unsure about the area formula for any shapes, you are free to google the formula. Notes: Please be careful with the calculation since we are working with int and returning a double. I recommend converting everything to double before doing the calculation. For the area of the Circle, please use the pi value of 3.14 for calculation.
to finish setting up these methods? Thanks!
In the file Area. java, we have provided code for the Shape interface and 4 classes that implement Shape. Your task will be to add a findArea() method to the Shape interface and implement it in all 4 classes. The 4 classes are: Square, Circle, Triangle and Trapezoid For all the findArea () methods, please return a double that represents the area of the shape. If you are unsure about the area formula for any shapes, you are free to google the formula. Notes: Please be careful with the calculation since we are working with int and returning a double. I recommend converting everything to double before doing the calculation. For the area of the Circle, please use the pi value of 3.14 for calculation.