Uploaded by ryanluvusm

Powerpoint Assignmet - 1651

advertisement
SLIDESMANIA.COM
1. What is object-oriented
programming?
Object-oriented programming (OOP) is a programming approach that centers
around objects, which incorporate both data and behavior. OOP emphasizes
creating reusable and modular code through the use of classes, which act as
blueprints for constructing objects.
SLIDESMANIA.COM
2
5 concepts in object-oriented
programming
1.
2.
3.
4.
5.
Class
Object
Encapsulation
Inheritance
Polymorphism
SLIDESMANIA.COM
3. 4 properties objectoriented programming
1.
2.
3.
4.
Encapsulation
Inheritance
Polymorphism
Abstraction
SLIDESMANIA.COM
4. Abstraction in C#
Abstraction in C# refers to the
practice of concealing the
implementation details of an object or
class and exposing only its essential
features. This allows developers to
work at a higher level of abstraction
and focus on the functionality and
behavior of an object, rather than its
inner workings.
SLIDESMANIA.COM
5. Implement abstraction using
Interface
Abstraction using interface is a technique in C# to define a set of methods that any
class implementing the interface must follow.
It is estimated that more than 50 million kangaroos live there. They are Australia’s
national symbol and appear on postage stamps, coins, and airplanes.
Koalas are even more lazy than cats.
SLIDESMANIA.COM
Koalas don’t have much energy and, when not feasting on leaves, they spend their
time dozing in the branches. Believe it or not, they can sleep for up to 18 hours a
day!
Polymorphism in C# means objects of different classes can be used interchangeably if they share
a common interface or base class. A parent variable can refer to a child object, and the method
or property called will depend on the actual type of the object at runtime.
SLIDESMANIA.COM
7. Encapsulation in C#
Encapsulation is an object-oriented
programming principle that bundles
data and related methods into a
single object.
Its purpose is to conceal the
implementation details of an object
from external code and provide a
clear interface for accessing and
modifying the object's internal state.
SLIDESMANIA.COM
Encapsulation helps to maintain
code modularity, reduce complexity
and protect the integrity of an
object's internal state.
8. Advantages of packing
Reduced storage space
Faster data transfer
Improved performance
Improved security
Compatibility
SLIDESMANIA.COM
9. Object-Oriented class
relationships
Inheritance
Composition
Aggregation
Association
SLIDESMANIA.COM
Dependency
Thank you!
Do you have any questions?
SLIDESMANIA.COM
Download