DAMAN VIRDI
OBJECT-ORIENTED
PROGRAMMING
OBJECT-ORIENTED PROGRAMMING
• Object-oriented programming is a programming paradigm based on the concept
of "objects", which can contain data and code: data in the form of fields, and
code, in the form of procedures.
• A feature of objects is that an object's own procedures can access and often
modify the data fields of itself.
• In object-oriented programming you write classes that represent real-world things and
situations, and you create objects based on these classes.
• When you write a class, you define the general behavior that a whole category of objects
can have.
INSTANCES OF CLASS
• Making an object from a class is called instantiation,
• And you work with instances of a class.
ATTRIBUTES
• Variables that are accessible through instances like this are called attributes.
CREATING AND USING A CLASS