Question: C++ ? ?C ? www.essfuca/ 2 classes html CMPT 225 Lab 2: C++ Classes Circles Write a compiete Cs class to represent a crcke in

C++  C++ ? ?C ? www.essfuca/ 2 classes html CMPT 225 Lab

? ?C ? www.essfuca/ 2 classes html CMPT 225 Lab 2: C++ Classes Circles Write a compiete Cs class to represent a crcke in two dimensional spaco Your class should consist of a header (circlke h) and an implementation (orcke cpp) tie as descrbod below The crcle class should have the following (private) attributes and (public) methods Attributes . x coordinate (an int), can be negative y coordinate (an int), can be negative . radius (a double), must be greater than 00 Methods . A default constructor that creates a circke of radus 10 at position 0,0 . A constructor with parameters for x y and radius . void move(int honz, int vert)-moves the circle the given horizontal and vertical distances (therefore changing its x and y attributes) yoid setRadusdouble rn) changes the circke's radius to r, or to 10 0 if r is invalid int getx) -returns the circle's x coordinate int getyo -returns the circle's y coordinate . double getRadiuso-returns the circle's radius . double getArea0 returns the circle's area , void displayCircie)-displays the circle's attributes like this radius 10 0 at point x 12, y 17 . bool intersec(Circle c)-returns true if c intersects the caling circle- this is an optional method so inish everything else first Writing a C++ Class h and.cpp Files OType here to search

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!