Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Make a copy of the CircleClass project folder Rename the copied project folder CircleClassSeparate Open the solution file for tl in VCExercisesooP folder files. This

image text in transcribed

Make a copy of the CircleClass project folder Rename the copied project folder CircleClassSeparate Open the solution file for tl in VCExercisesooP folder files. This new Circle class will replace the old class declared in the same.cpp file as main0 Click the Projeet item tab and select Add Class... Select C++ Class o CircleCless Micesoft Viaual Studio Fle Eat Viewi Prject Buildb Team D Tel Te and click the Add button to start the C++ Class Wizard Selution Explere Cless Solution Ca,Add NewItem. Add Carl-Shift+X Sclution Expleres Type Circle in the Class name field and click Finish to add Circle.h Add Resource cd Circle.cpp files to the project files in the solution. :mCirciedla Add Existing item." Head Generic C+ Class Wizard CircleClass Show All Fes Rescan Solution et as StanUp Project CirdeCles properties." Welcome to the Generic +Class Wizard -Read! Alt-F7 cpp file: Cirde.cpp h fle: Crdie.h Access: public Cless nae Circ Ease dass: yrtual destructor nine Copy the entire XCircle definition from the main.cpp file into Circle.h, completely replacing the IDE- to Circle. Delete the body of the two constructors and each and every member function, placing a semicolon after each description, so that these function names serve as f header file. Keep the private data member radius as part of this definition. The resulting adju ded default constructor and destructor. Change the class name and the two constructors from XCircle unction prototypes in the Circle.h shown here #pragma once class Circle Circle.h file public: Circle); Circle (double initialRadius); double getRadius() double getDiameter const; double getArea() void setRadius (double newRadius); // default constructor (no-argument constructor) // constructor with initial radius parameter // accessor member functions (public) const; const; // mutator member function (public) private: double radius; // data member (private) 3; Copy the entire XCircle definition into Circle.cpp, completely replacing the supplied constructor and destructor code there. Strip out the XCircle Class heading, public: label, and the brackets that surround the class. Also remove the private: next be implemen with the scope resolution operator :: to ever functions implement the member functions of the Circle class (Circle::). None of the code in these functions needs to be changed at this point. data member radius from this file. Each of these member functions will , along ted in this separate .cpp file as a standalone function. Add the class name Circle y one of these member functions to make it clear that these

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

Students also viewed these Databases questions