Question: C++ Programming * Create 2 Circle objects (one using default constuctor, one by passing in a non 0, positive arugment, using non-pointer circle variables. Call

C++ Programming

* Create 2 Circle objects (one using default constuctor, one by passing in a non 0, positive arugment, using non-pointer circle variables. Call the getArea, getDiameter and getCircumference methods and diplay the results.

* Write a destructor that simply has a cout statement noting the circle is being destroyed

* Create a pointer to a Circle, create a new Circle object with a non zero positive radius and set the pointer to point to it.

* delete the memory for this newly created circle (you should see the destructor message when running)

* Call the circle get Area, Diameter and Circumference methods using the pointer to a circle and display the results.

*IT should have 3 files in the project Circle.h, Circle.cpp and a test .cpp file with your main() in it.

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!