0% found this document useful (0 votes)
30 views

Introduction To Object Oriented Programming in Java

Uploaded by

Satyajit Satvaya
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
30 views

Introduction To Object Oriented Programming in Java

Uploaded by

Satyajit Satvaya
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 12

Greater Kolkata College of

Engineering & Management (JIS)

Name : Sounak Thakur Roll No : 23600122081 Sem : 5th

Subject Name : Object Oriented Programming Subject Code : PCC CS503


Introduction to Object
Oriented Programming
in in Java
Object Oriented Programming is a programming paradigm that relies on the concept of
classes and objects. In Java, it is a powerful language feature that makes it easy to write
reusable and maintainable code.

Classes and Objects


Classes Objects
Classes are blueprints for creating objects. They Objects are instances of
classes. They contain their define the attributes (data) and methods
(functions) own set of values for the attributes defined in the
that the objects will have. class and they can perform the methods defined in
the class.

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

An abstract class is a class that cannot be An interface is a collection of method


instantiated, but can be inherited by other signatures that define a set of behaviors.
classes. It defines a common interface and a set Implementing an interface allows a class to be
of common methods. considered as having those behaviors.

Benefits of Object Oriented Programming in


C Classes can be
J o reused in
d multiple
a e projects,
reducing
v R development

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.

You might also like