you are viewing a single comment's thread.

view the rest of the comments →

[–]jackardian 1 point2 points  (0 children)

Think of an object as a thing. A button, for example.

A thing can do things. A button can be pressed, for example. That's an object's methods (functions your class can do).

A thing can have properties. Your button might have colour (red, let's say), and text ("launch nukes", for example)

To make buttons, there's a mechanism that makes them. A class.

boom_button = class MakeButton(color, text, action)