Object Oriented Programming Class 12 EM
Object Oriented Programming Class 12 EM
Class-12
Classes are user-defined data types that act as the blueprint for
individual objects, attributes and methods.
Methods are functions that are defined inside a class that describe the
behaviors of an object. Each method contained in class definitions starts
with a reference to an instance object. Additionally, the subroutines
contained in an object are called instance methods. Programmers use
methods for reusability or keeping functionality encapsulated inside one
object at a time.
Attributes are defined in the class template and represent the state of
an object. Objects will have data stored in the attributes field. Class
attributes belong to the class itself.
main principles of OOP
Object-oriented programming is based on the following principles:
Ruby
Scala
JADE
Emerald
Java
Python
C++
PHP
JavaScript
Advantages of OOP-
Benefits of OOP include: