Answered step by step
Verified Expert Solution
Link Copied!

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
please i need an overdetailed answer
image text in transcribed
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

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Graph Databases

Authors: Ian Robinson, Jim Webber, Emil Eifrem

1st Edition

1449356265, 978-1449356262

Students also viewed these Databases questions

Question

=+ (b) Show that no record stands forever.

Answered: 1 week ago