Circle Class Reference
#include <circle.h>
Inheritance diagram for Circle:

Collaboration diagram for Circle:

Public Member Functions | |
| Circle (int r, int x, int y) | |
| Circle (int r, Point c) | |
| virtual std::string | getType () const |
| virtual double | getArea () const |
Public Member Functions inherited from Shape | |
| Shape (int x, int y) | |
| Shape (Point c) | |
| Point | getCenter () const |
| void | setCenter (Point c) |
Additional Inherited Members | |
Protected Attributes inherited from Shape | |
| Point | center |
Detailed Description
A class that represents a circle on a 2D plane. Its only member is its radius and it inherits all of its functionality from the Shape class.
Constructor & Destructor Documentation
◆ Circle() [1/2]
| Circle::Circle | ( | int | r, |
| int | x, | ||
| int | y | ||
| ) |
Overloaded constructor that takes in a radius and an (x,y) coordinate.
- Parameters
-
r The radius of the circle (must be greater than 0) x The X coordinate of the circle's center point in 2D space y The Y coordinate of the circle's center point in 2D space
◆ Circle() [2/2]
| Circle::Circle | ( | int | r, |
| Point | c | ||
| ) |
Overloaded constructor that takes in a radius and a center Point.
- Parameters
-
r The radius of the circle (must be greater than 0) c The center point of the circle in 2D space
Member Function Documentation
◆ getArea()
|
virtual |
◆ getType()
|
virtual |
The documentation for this class was generated from the following files:
- /home/awalsh128/doxygen-themes/example_src/circle.h
- /home/awalsh128/doxygen-themes/example_src/circle.cpp
Public Member Functions inherited from