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

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!