0% found this document useful (0 votes)
23 views2 pages

Oops

1. The key object oriented programming concepts are classes, objects, encapsulation, inheritance, polymorphism, abstraction, methods, attributes/properties, and constructors. 2. Polymorphism allows one function to behave differently depending on the object, and can be achieved through method overloading and overriding. 3. Abstraction hides implementation details and shows only functionality, using abstract classes and interfaces. 4. Abstract classes can contain implementation details while interfaces contain only method declarations.

Uploaded by

Meghana S M
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
23 views2 pages

Oops

1. The key object oriented programming concepts are classes, objects, encapsulation, inheritance, polymorphism, abstraction, methods, attributes/properties, and constructors. 2. Polymorphism allows one function to behave differently depending on the object, and can be achieved through method overloading and overriding. 3. Abstraction hides implementation details and shows only functionality, using abstract classes and interfaces. 4. Abstract classes can contain implementation details while interfaces contain only method declarations.

Uploaded by

Meghana S M
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 2

1.

Objects: Instance of an class


2. Classes: A class is blueprint of objects.
3. Encapsulation: Binding the data member(public int) & func(methods) using access modifier
4. Inheritance: Acquiring the properties from base class to child class. we can achieve multiple inheritance
5. Polymorphism: Polymorphism means one name, many forms. One function behaves in different forms. In other words,
"Many forms of a single object is called Polymorphism."
Compile time polymorphism is achieved by method overloading and operator overloading. It is also known as static binding or
early binding. Runtime polymorphism is achieved by method overriding which is also known as dynamic binding or late
binding.
method overloading which contains method name should be same d/f in type of parameter, arrangement of parameter and
number of parameter. Ex : push notification
derived class defines same method as defined in its base class, it is known as method overriding
6. Abstraction: Hiding the implementation & showing functionality. we can achieve using abstract class and interface
7. Methods: Collection of statement, can't contain multiple class
8. Attributes/Properties: attributes as pieces of information or characteristics that describe something. Properties are neatly
package the attributes within an object. They are like special containers that hold and manage these information.
9. Constructor: A constructor is like the special process that calls when you create an object. It sets up the initial state of the
object and prepares it for use. we can create parameterized constructor
10. Instance: The instance of a class refers to an object of that class that inherits the properties and methods of that class.
instance variables across different objects can have different values whereas class variables across different objects can have
only one value.
 Boxing converts a Value Type(int, char, etc) variable into a Reference Type(object) variable, and Unboxing achieves the vice-
versa.
Value Type variables are stored in the stack. sends value(5,3...) v/s Reference Type variables are stored in the heap. sends value
using ref keyword

Abstract Class Interface

It contains only the declaration of methods. default


It contains both declaration and implementation parts. implementations can also be included in interfaces.

Multiple inheritance is not achieved by abstract class. Multiple inheritance is achieved by interface.

It contain constructor. It does not contain constructor.

It can contain static members. It does not contain static members.

It can contain different types of access modifiers like It only contains public access modifier because everything
public, private, protected etc. in the interface is public.

A class can only use one abstract class. A class can use multiple interface.

You might also like