| |
- builtins.object
-
- Shape
-
- Circle
- RectangleInt
- Square
class Circle(Shape) |
|
Circle(r: 'double')
A class for representing a circle.
Author: Jack |
|
- Method resolution order:
- Circle
- Shape
- builtins.object
Methods defined here:
- __init__(self, r: 'double')
- Construct a circle
:type r: float
:param r: radius of the circle
- __repr__ = _swig_repr(self)
- area(self) -> 'double'
- Calculate the area of the circle
:rtype: float
:return: calculated area
- perimeter(self) -> 'double'
- Calculate the perimeter of the circle
:rtype: float
:return: calculated perimeter of the circle
Static methods defined here:
- __swig_destroy__ = delete_Circle(...)
Data descriptors defined here:
- thisown
- The membership flag
Methods inherited from Shape:
- move(self, dx: 'double', dy: 'double') -> 'void'
- Move a shape to a new co-ordinate
:type dx: float
:param dx: x co-ordinate
:type dy: float
:param dy: y co-ordinate
Data descriptors inherited from Shape:
- __dict__
- dictionary for instance variables (if defined)
- __weakref__
- list of weak references to the object (if defined)
- nshapes
- Number of shapes currently in existence
- x
- x co-ordinate
- y
- y co-ordinate
|
class RectangleInt(Shape) |
|
RectangleInt(h: 'int', w: 'int')
A class for representing a rectangle, templated on the type for the rectangle dimensions - this instantiation uses type int |
|
- Method resolution order:
- RectangleInt
- Shape
- builtins.object
Methods defined here:
- __init__(self, h: 'int', w: 'int')
- Construct a rectangle
:type h: int
:param h: height of the rectangle
:type w: int
:param w: width of the rectangle
- __repr__ = _swig_repr(self)
- area(self) -> 'double'
- Calculate the area of the rectangle
:rtype: float
:return: calculated area
- perimeter(self) -> 'double'
- Calculate the perimeter of the rectangle
:rtype: float
:return: calculated perimeter of the rectangle
Static methods defined here:
- __swig_destroy__ = delete_RectangleInt(...)
Data descriptors defined here:
- thisown
- The membership flag
Methods inherited from Shape:
- move(self, dx: 'double', dy: 'double') -> 'void'
- Move a shape to a new co-ordinate
:type dx: float
:param dx: x co-ordinate
:type dy: float
:param dy: y co-ordinate
Data descriptors inherited from Shape:
- __dict__
- dictionary for instance variables (if defined)
- __weakref__
- list of weak references to the object (if defined)
- nshapes
- Number of shapes currently in existence
- x
- x co-ordinate
- y
- y co-ordinate
|
class Shape(builtins.object) |
|
Shape(*args, **kwargs)
Base class for all shapes.
Author: Bob |
|
Methods defined here:
- __init__(self, *args, **kwargs)
- Initialize self. See help(type(self)) for accurate signature.
- __repr__ = _swig_repr(self)
- area(self) -> 'double'
- :rtype: float
:return: the area
- move(self, dx: 'double', dy: 'double') -> 'void'
- Move a shape to a new co-ordinate
:type dx: float
:param dx: x co-ordinate
:type dy: float
:param dy: y co-ordinate
- perimeter(self) -> 'double'
- :rtype: float
:return: the perimeter
Static methods defined here:
- __swig_destroy__ = delete_Shape(...)
- Destructor for destroying a Shape
Data descriptors defined here:
- __dict__
- dictionary for instance variables (if defined)
- __weakref__
- list of weak references to the object (if defined)
- nshapes
- Number of shapes currently in existence
- thisown
- The membership flag
- x
- x co-ordinate
- y
- y co-ordinate
|
class Square(Shape) |
|
Square(w: 'double')
A class for representing a square. |
|
- Method resolution order:
- Square
- Shape
- builtins.object
Methods defined here:
- __init__(self, w: 'double')
- Construct a square
:type w: float
:param w: width of the square
- __repr__ = _swig_repr(self)
- area(self) -> 'double'
- Calculate the area of the square
:rtype: float
:return: calculated area
- perimeter(self) -> 'double'
- Calculate the perimeter of the square
:rtype: float
:return: calculated perimeter of the square
Static methods defined here:
- __swig_destroy__ = delete_Square(...)
Data descriptors defined here:
- thisown
- The membership flag
Methods inherited from Shape:
- move(self, dx: 'double', dy: 'double') -> 'void'
- Move a shape to a new co-ordinate
:type dx: float
:param dx: x co-ordinate
:type dy: float
:param dy: y co-ordinate
Data descriptors inherited from Shape:
- __dict__
- dictionary for instance variables (if defined)
- __weakref__
- list of weak references to the object (if defined)
- nshapes
- Number of shapes currently in existence
- x
- x co-ordinate
- y
- y co-ordinate
| |