OOP Workshop

Drawing Base Button Shape

def drawButtonShape(self, aTurtle):
        aTurtle.pensize(20)
        aTurtle.penup()
        aTurtle.goto(self.buttonX, self.buttonY +10)
        aTurtle.pendown()
        aTurtle.forward(self.width)

drawButtonShape method will be coded inside the Button class to draw a line segment as the default action. This method will later be overridden by the child classes of Button, inheriting and extending/overriding the functionality.