Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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

image text in transcribed

- 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

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

Databases And Information Systems 1 International Baltic Conference Dbandis 2020 Tallinn Estonia June 19 2020 Proceedings

Authors: Tarmo Robal ,Hele-Mai Haav ,Jaan Penjam ,Raimundas Matulevicius

1st Edition

303057671X, 978-3030576714

Students also viewed these Databases questions