0% found this document useful (0 votes)
127 views3 pages

OOP's (Object Oriented Programming's)

OOPs involves organizing programs into collections of objects that represent instances of classes within an inheritance hierarchy. A class defines common properties and relationships, while an object is an identifiable entity with state (data) and behavior (functions). Encapsulation wraps data and methods into a single class unit to keep them safe from external interfaces. Abstraction refers to representing essential features without details. Inheritance creates new derived classes from existing base classes that inherit members and can add their own functions. Polymorphism allows the same name to take different forms via different signatures, parameters, or sequences. Static classes cannot be instantiated and all members are static.
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)
127 views3 pages

OOP's (Object Oriented Programming's)

OOPs involves organizing programs into collections of objects that represent instances of classes within an inheritance hierarchy. A class defines common properties and relationships, while an object is an identifiable entity with state (data) and behavior (functions). Encapsulation wraps data and methods into a single class unit to keep them safe from external interfaces. Abstraction refers to representing essential features without details. Inheritance creates new derived classes from existing base classes that inherit members and can add their own functions. Polymorphism allows the same name to take different forms via different signatures, parameters, or sequences. Static classes cannot be instantiated and all members are static.
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/ 3

OOP’s (Object Oriented Programming’s)

OOP’s is a method of implementation in which Programs are Organized in to a


collection of Objects and each Object represent an instance of same class, and whose class
are all member of hierarchy of class via inheritance relationships.

CLASS: - A Class is a Collection of Objects that shares Common Properties and Relationships.
A Class is a Reference Type user defines Data Type which holds both Data and Function. The
variable of a Class are called Objects or In other words you can say an Instance of a class. Ex-
We can say Bird is a Class but Kite, Sparrow, Kingfishers etc. are the Objects of Bird Class.

OBJECT: - Object is an Entity that can Store and Receive Messages. An Object is an
identifiable entity with some State (Data) and Behavior (Function).
class men
{
Hand, eye, head, nose, leg, mouth;
Public Tallk();
Public walk();
Public singing();
}

Encapsulation:-Encapsulation is wrapping up Data and Methods in to a single Unit that’s


called Class. In other word it is a Mechanism that associates the Data Member and Member
Function (Code) which manipulate in to a single unit and keep them safe from External
Interface and Misuse. You can say Encapsulation is the way to implement Abstraction.

ABSTRACTION: - It refers to the act of representing essential features without including


background details or explanations.

INHERITANCE: - It involves in the creation of new class (Derive Class) from the existing class
(Base Class). The new derive-class inherits the Member of Base class & also adds its own
function.
POLYMORPHISM: - One Name many forms but different signature. And the signatures are-
1- No of Parameter Different.
2- Type of Parameter Different.
3- Sequence of Parameter Different.
Here are many Type of Polymorphism in use on bases of functions and Operators.
Dynamic Binding:- Runtime Attachment of Code with Method.
Message Passing:- Provide Communication to Object with Class.
Overriding:- Implemented in Inheritance. It is Called Runtime Polymorphism or Late Binding
for CLR/JVM.
Overloading:- It also Implemented in Inheritance. It is Called Compile Polymorphism or Early
Binding for CLR/JVM.

INHERITANCE:- It is a process by which object of one class acquire property of another


class. A class is derived from the base class this concept called Inheritance. The class which
derived from another class is called derived classes. A class is derived another class is called
base class.

Form of Inheritance:- Inheritance is classified on the bases of the levels of Inheritance and
Inter Relation among the classes involved in inheritance process.

Single Inheritance:- A method in which a class derived from only one class is called single
Inheritance.

Hierarchical Inheritance:- A mechanism in which several classes are derived from single
base class is called Hierarchical Inheritance.

Multilevel Inheritance:- The mechanism of deriving a class from another derived class is
called Multilevel Inheritance.

Multiple Inheritance:- A method in which a class derived from several base classes is called
multiple Inheritance.
But Multiple Inheritance is not supported in C# and Java for the Classes.

Hybrid Inheritance:- A method of implementing more than One type of Inheritance is called
Hybrid Inheritance.
Static:-
The static modifier on a class means that the class cannot be instantiated, and that all of its
members are static. A static member has one version regardless of how many instances of
its enclosing type are created.
A static class is basically the same as a non-static class, but there is one difference: a static
class cannot be externally instantiated. In other words, you cannot use the new keyword to
create a variable of the class type. Because there is no instance variable, you access the
members of a static class by using the class name itself.
However, there is a such thing as a static constructor. Any class can have one of these,
including static classes. They cannot be called directly & cannot have parameters (other
than any type parameters on the class itself). A static constructor is called automatically to
initialize the class before the first instance is created or any static members are referenced.
Looks like this:
staticclassFoo(){staticFoo(){Bar="fubar";}publicstaticstringBar{ get;set;}}
Static classes are often used as services, you can use them like so:
MyStaticClass.ServiceMethod(...);

You might also like