Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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++ image text in transcribed
? ?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

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

Oracle 10g Database Administrator Implementation And Administration

Authors: Gavin Powell, Carol McCullough Dieter

2nd Edition

1418836656, 9781418836658

More Books

Students also viewed these Databases questions