Question
Write the definition for a class called triangle that has integer data member's which are the 3 sides of the triangle. The class has the
Write the definition for a class called triangle that has integer data member's which are the 3 sides of the triangle. The class has the following: - The triangle is defined by the length of its 3 sides. Each length is an integer. You can name the sides whatever you want, but you do need three variables. The class must have three setter methods ( setA(int), setB(int), setC(int) ) that allow a programmer to change the length of cach side. The class must have four additional methods isEquilateral(), isScalene(), islsosceles(). and isRight(). Each of these last four methods has no parameters and returns a boolean value that iS true if the appropriate condition is met.
Define three types of constructors and one destructor.
Define one accessor and one mutator function that use this pointer.
Define a variable count that counts the number of objects created a
Define a function to compare the area of two objects to see which is the larger.
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