OOP Workshop

Button class

class Button:
    buttonShape = "Line"
    buttonColor = "Orange"    
    buttonX = 0
    buttonY = 0    
    width = 100
    height = 50
    

Button is a new data type which contains some properties and methods specific to itself and its descendants.


Object oriented programming aims to provide the following major properties

Object oriented programming is built mainly upon the following concepts:

You can find more formal definitions of these concepts online, and may be with different approaches based on the programming language.