Question: c++ class please i need an overdetailed answer Create a class called Triangle that includes the following data members: - base (double) - height (double)
Create a class called Triangle that includes the following data members: - base (double) - height (double) - Your class should have a constructor that initializes all members to 1. - Also, provide set and get functions for both attributes. - The set functions should verify that either values are larger than 0.0 and less than 20.0, otherwise, it will display an error message. - The class should have a function Perimeter to compute and return the perimeter of the triangle. [Note: Perimeter =b+h+bb+h2, where b is the base, h is the height]
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
