Rosetta
Public Member Functions | Public Attributes | List of all members
test.Workshop9_my_shapes.MyShape Class Reference
Inheritance diagram for test.Workshop9_my_shapes.MyShape:
Inheritance graph
[legend]

Public Member Functions

def __init__ (self)
 
def __str__ (self)
 
def area (self)
 
def draw (self, line_width=1)
 

Public Attributes

 color
 

Detailed Description

A base class for a generic shape.

Constructor & Destructor Documentation

◆ __init__()

def test.Workshop9_my_shapes.MyShape.__init__ (   self)

Member Function Documentation

◆ __str__()

def test.Workshop9_my_shapes.MyShape.__str__ (   self)

◆ area()

def test.Workshop9_my_shapes.MyShape.area (   self)
Return the area of the shape.

Reimplemented in test.Workshop9_my_shapes.MySquare, and test.Workshop9_my_shapes.MyCircle.

◆ draw()

def test.Workshop9_my_shapes.MyShape.draw (   self,
  line_width = 1 
)
Draw the shape on the screen.

Member Data Documentation

◆ color

test.Workshop9_my_shapes.MyShape.color

The documentation for this class was generated from the following file: