IN JAVA:
Add a static method which computes the area of several commonshapes: triangle, rectangle and parallelogram. The class shouldhave a single static method called printArea that takes inthree parameters: an enum for the shape type, a double for the baseand a double for the height.
Your program will first ask the user to type in a shape (square,parallelogram, triangle) , base and height via the console. Then,use an IF-ELSE statement to call the printArea() method with theappropriate parameters.
As a reminder, the equations for area for the above shapes is:areasquare = bh
areaparallelogram = bh areatriangle = bh*(1/2)
Your printArea method will be static,
PayPal Gateway not configured
PayPal Gateway not configured