Introduction To Object Oriented Programming in Java
Introduction To Object Oriented Programming in Java
I n
n c
h e
e
r
i
t
a
P Also known as superclass, the parent
a class is the class that is being inherited
r from. It provides common attributes
e and methods that can be shared by its
n child classes.
t Child
Class
C Also known as subclass, the child class
l inherits all the attributes and methods
a provided by its parent class, and can also
s have its own attributes and methods.
s
Polymorphism
1 Method Overloading
Method overloading allows a class to have methods with the same name
but different parameters.
2 Method
Overriding
Method overriding allows a subclass to create a method with the same
name and signature as its parent class.
Encapsulation
1 Data Hiding
Encapsulation allows classes to keep the data and methods that operate on the data private, preventing
outside code from accessing or modifying it directly.
2 Access Control
Access modifiers such as public, private, and protected allow control over which classes and objects
can access certain attributes and methods.
3 Information Hiding
By hiding implementation details behind a public interface, encapsulation makes it easier to modify
the implementation without affecting the code that uses it.
Abstraction
Abstract Class Interface
e time and
a u increasing
consistency.
s
a
b
i
l
i
t
y
M Object Oriented Programming focus on the
a makes it easier to make changes essential features
i to code without affecting other of a program,
n parts of the system. rather than getting
t A bogged down in
a b implementation
i s details.
n t
a r
b a
i c
l t
i i
t o
y n
Abstraction
makes it easier to
Conclusion
Object Oriented Programming in Java is a valuable tool for creating reusable and maintainable code. By
focusing on classes, objects, and inheritance, developers can create robust and flexible programs with ease.
Thank You!
Thank you for attending this presentation on Object Oriented Programming in Java. We
hope that you have gained valuable insights and will apply this knowledge in your
projects going forward.