Professional Documents
Culture Documents
Oops
Oops
TOPICS COVERED
DEFINITION
COMPONENTS
CLASS DEFINITION
OBJECT DEFINITION
VARIABLE DEFINITION
TYPES OF VARIABLES
DEFINITION
• OOPS is abbreviated as ,
• ( Objects Oriented Programming Paradigm Structure).
• Using this structure collec of func will be groomed (or)
contained in a single class and it will be accessed by an
object.
• Containing or capsulating a ‘N’ number of functions as
possible.
• EXAMPLE: A Capsule containing a list of medical substances.
DEFINITION
• Polymorphism - It enables a single interface to be used for multiple
implementations, providing flexibility and extensibility in code design.
• Self - keyword is a convention used to refer to the instance of a class
within the class itself. It acts as a reference to the current object on
which a method is being invoked. self is a special keyword is used in
oops,this allows used to access class variable and its properties.
• __init__ constructor – the primary purpose of __init__ method is to
initialize the attributes(variables) of an object with values provided
during object creation.
• Variables
COMPONENTS
• Classes - collection of objects
• Objects - instance of
class(eg.bool,str,int,list,dict,tuple,function,type)
• Data abstraction - where user is kept unaware of the
functions property.
• Inheritance - passing down properties of parent class to
child class (eg.passing down father's gene to son's ).
• Data encapsulation - the concept of bundling data and
methods in a single unit.
CLASS DEFINITION
• class means internal data model references of the
stored methods functionality inside a container.
• Class means collection of objects.
• Class is a blueprint to create objects.
• Class is a container for collection of function (or) methods.
• Class creates local name space for all of its functions. (temp)
• Class is a collection of different states and behaviors.
• Class is a collection of data(variables) and
member(functions).
CLASS DEFINITION
• Class is a collection of properties and attributes.
• Real time example - bike as a class.
• Properties of a bike(class)-handlebar/abs/fuel tank/liquid
cooler/drl headlamps.(this example denotes
multifunctionality)
• Properties - features.
• Attributes - values.
• States - dedicated functions.
OBJECT DEFINITION