Write the definition of the object TriangleType. The attributes of the object include the base and height of a triangle. The class definition must contain
Write the definition of the object TriangleType. The attributes of the object include the base and height of a triangle. The class definition must contain a default and an overloaded constructor. The default constructor must set all fields to 0. The overloaded constructor should set the base and height of the TriangleType object to values of constructor's parameters. You must also include the appropriate mutators and accessors for each member of the TriangleType object. Add the definition of a method called calcAreaTriangle to calculate the area of the triangle and return the calculated answer. Use the formula below:
Area =21Step by Step Solution
There are 3 Steps involved in it
Step: 1
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started