Question: c++ class please i need an overdetailed answer Create a class called Triangle that includes the following data members: - base (double) - height (double)

c++ class
please i need an overdetailed answer
c++ classplease i need an overdetailed answer Create a class called Triangle

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

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!