Question: You are given the Shape class to be used as a base for other shapes. Create a Triangle class based on the UML diagrams below.
You are given the Shape class to be used as a base for other shapes.
Create a Triangle class based on the UML diagrams below.
Note that the triangle is equilateral, all three sides are the same length.
The formula for the area of an equilateral triangle is as follows:
area sqrt side
The default side length of a newly constructed triangle should be
The name of a newly constructed triangle should be "triangle".
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
