Question: - You will implement 2 classes named Triangle and Circle. All names will be exactly as specified here, case included. You will submit a .cpp

 - You will implement 2 classes named Triangle and Circle. All

- You will implement 2 classes named Triangle and Circle. All names will be exactly as specified here, case included. You will submit a .cpp file and a .h file for each of these classes. The submission is 4 files total. You will write your own test driver to exercise and test these classes but you will not submit the test driver to me. I will have my own test driver and will plug your classes into my project to test them. - General note - Make sure all the integers receive positive values. If a negative value is given, handle it gracefully. Suggestions include convert it to a positive value of the same magnitude (change -1 to 1), or provide a default value and issue an error message. See note about the Triangle::GetArea() function - make sure this doesn't crash and do error checking as described. - The Triangle class will contain the following private data: - The triangle classes will contain 2 constructors and one destructor. The destructor in this case will simply display a parting message (Ex: "Good bye cruel world! You won't have the Triangle to kick around anymore!") The constructors will be: - A default constructor with no arguments. It will provide default values to the member variables - Another constructor will take 3 integers as arguments and will set the member variables to those values

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!