[go: up one dir, main page]

0% found this document useful (0 votes)
25 views14 pages

OOP's Mahesh

Uploaded by

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

OOP's Mahesh

Uploaded by

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

PDA College Of

Engineering
-By Mahesh Joshi
III SEM CSE
3PD23CS402
OOP’S WITH
JAVA
Contents:

 Basic concept of OOP


 Polymorphism
 Classes
 Benefits of OOPs
 Object
 Application of OOPs
 Objects and Instances
 Data Encapsulation and Abstraction  Advantages of OOPs
 Inheritance  Exception Handling
Introduction to OOP’s

 Object-Oriented Programming (OOP’s) concepts in Java helps reduce code complexity and enables
the reusability of code. Programmers feel like working with real-life entities or objects.

 Object-oriented programming is a programming paradigm that brings together data and methods
in a single entity called object.

 This promotes greater understanding as well as flexibility and maintenance of code over a long
period of time.
Introduction to OOP’s

Encapsulation

Genericity Abstraction

Message
OOP’s Inheritance
Passing

Multiple
Polymorphism
Inheritance

Interface
Classes & Objects

 Classes -
 A class in the context of Java is a template used to create objects and to define
object data types and methods. Classes are categories, and objects are items
within each category. All class objects should have the basic class properties.
 Objects –
 In the Java programming language, an object is an instance of a Java class,
meaning it is a copy of a specific class. Java objects have three primary
characteristics: identity, state, and behavior.
Classes & Objects

Class

Constructor
Objects Methods Datatypes
s
Exception Handling

 Exception handling –
 It is the process of responding to unwanted or unexpected events when a
computer program runs.
 Exception handling deals with these events to avoid the program or
system crashing, and without this process, exceptions would disrupt the
normal operation of a program.
Main Features of OOP’s

Inheritance Encapsulation Interface

Encapsulation in Java
Java, Inheritance is an
refers to integrating data In the Java programming
important pillar of
(variables) and code language, an interface
OOP(Object-Oriented
(methods) into a single is a reference type,
Programming). It is the
unit. In encapsulation, a similar to a class, that
mechanism in Java by
class's variables are can contain only
which one class is
hidden from other constants, method
allowed to inherit the
classes and can only be signatures, default
features(fields and
accessed by the methods, static methods,
methods) of another
methods of the class in and nested types.
class.
which they are found.
Inheritance

 Inheritance in Java is a mechanism in which one object acquires all the


properties and behaviors of a parent object. It is an important part
of OOPs (Object Oriented programming system).

Inheritance

Single Level Multi-Level Multiple


Inheritance Inheritance Inheritance
Single Level Inheritance

Class A

Class B
Multi-Level Inheritance

Class A

Class B

Class C
Multiple Inheritance

Class A

Class B Class C
THANK YOU

You might also like