Question: JAVA 1. Write a class called Triangle with 1 variable side 2. Write a constructor that accepts a side parameter and sets the side variable
JAVA
1. Write a class called Triangle with 1 variable side
2. Write a constructor that accepts a side parameter and sets the side variable to 1.
3. Write a method called area accepts side as a parameter and returns the area of the square
4. Write a class SquareApplication with a main method that instantiates square.
5. Call methods and return the area.
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
