Answered step by step
Verified Expert Solution
Question
1 Approved Answer
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
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] please i need an overdetailed answer
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
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