Question: subject:object oriented programming(c++) Define and implement the overloaded constructors that support the following test function for a Triangle class. The data members for the Triangle
subject:object oriented programming(c++)
Define and implement the overloaded constructors that support the following test function for a Triangle class. The data members for the Triangle class are: triangleBase-- integer number height-- integer number int main() { Triangle t1(); //t1 will take all default value Triangle t2(3, 10); //t2 will take all supplied value Triangle t3(5); //t3 will take supplied triangleBase, height will take default value Triangle t4 = t2; //t4 will take the same value of t2 //the rest of the code }
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
