Java - Chapter - Introduction to Object Oriented Programming

SeemantaBhowmick1 25 views 17 slides Sep 14, 2025
Slide 1
Slide 1 of 17
Slide 1
1
Slide 2
2
Slide 3
3
Slide 4
4
Slide 5
5
Slide 6
6
Slide 7
7
Slide 8
8
Slide 9
9
Slide 10
10
Slide 11
11
Slide 12
12
Slide 13
13
Slide 14
14
Slide 15
15
Slide 16
16
Slide 17
17

About This Presentation

Java - Chapter - Introduction to OOP


Slide Content

CHAPTER 1 : INTRODUCTION TO OBJECT ORIENTED PROGRAMMING CONCEPTS

Paradigms Paradigm means organizing principle of a program. It is an approach to programming. In other words, it is a way of thinking or doing things.

Procedural Programming A program in a procedural language is a list of instructions where each statement tells the computer to do something. The focus is on the processing, that is, the algorithm needed to perform the desired computation. The emphasis is on doing things and not on data.

Procedural Programming

Modular Programming Modular Programming is an extension of procedural programming. A large program is divided into smaller parts known as modules. Each module work independently of all others. Each module can work with its own data as well as with the data passed to it.

Object Oriented Programming Object oriented approach views a program in terms of objects involved rather than the procedure for solving it. OOP approach gives data the prime importance. It is able to model real world problems well.

Object Oriented Programming

Differences between POP & OOP POP OOP 1. In POP, program is divided into small parts called functions. 1. In OOP, program is divided into parts called objects. 2. Importance is not given to data but to functions . 2. Importance is given to data rather than to functions . 3. POP follows Top Down approach. 3. OOP follows Bottom Up approach. 4. POP does not have access specifier. 4. OOP has access specifier – public, private, protected, etc. 5. Data can move freely from function to function in the system. 5. Data cannot move free ly.

Differences between POP & OOP (contd.) POP OOP 6. POP does not have any proper way for hiding data so it is less secure. 6. OOP provides data hiding so provides more security. 7. In POP, Overloading is not possible. 7. In OOP, Overloading is possible in the form of Function Overloading and Operator Overloading. Examples – C, VB, FORTRAN, Pascal Examples – C++, JAVA, VB.NET, C#.NET

Data Abstraction It is the act of representation of the essential features without including the background details or explanations. For example, hiding the internal details of the car like its motor working, wiring, etc.

Encapsulation The wrapping up of data members and member functions together into a single unit (called class) is known as encapsulation. Data cannot be accessed directly. If you want to read a data item in an object, you call a method or member function in the object to do it.

I nheritance Inheritance is the capability of one class to inherit the capabilities or properties from another class( es ). A base / super / parent class is the super class from which another class inherits properties. The inheriting class is called derived / sub / child class.

I nheritance

Polymorphism Polymorphism is the ability for a message or data to be processed in more than one form.

Advantages of OOP Re-use of code. Ease of comprehension. Ease of fabrication and maintenance. Easy redesign and extension.

Disadvantages of OOP With OOP, classes tend to be overly generalized. Relation among classes become artificial at times. OOP programs’ design is tricky. One needs to do proper planning and proper design for OOP programming. Programmer needs proper skills, thinking in terms of objects, etc.

THANK YOU!
Tags