OOP Unit1 P1
OOP Unit1 P1
III-SEMESTER
Presented By
Dr. D. BASWARAJ
Professor, CSE DEPT.
VCE, HYDERABAD
COURSE OBJECTIVES
UNIT – V:
Lambda expressions: Expressions, Functions, lambda as
argument
Stream API: Basics, Filter, Sort, Map, Collect
Regular Expressions: Pattern, Matcher, Regular expression
Syntax
JAVA Beans: Architecture
SYLLABUS …
Learning Resources:
1. Herbert Schildt, Java: The Complete Reference, 12th Edition, Tata
McGraw Hill 2021.
2. Joshua Bloch, Effective Java, 3rd Edition, Pearson, 2017
3. Timothy Budd, An introduction to Object-Oriented Programming,
3rd Edition, Pearson Education, 2008
4. Eric Freeman, Bert Bates, Kathy Sierra , Head First Design
Patterns: A Brain-Friendly Guide, 1st Edition, O’Reilly, 2016
5. P. RadhaKrishna, Object Oriented Programming through Java,
UniversitiesPress,2007.
6. Sachin Malhotra, Saurabh Choudhary, Programming in Java, 2nd
Edition, Oxford Press, 2014.
7. https://docs.oracle.com/javase/tutorial/java
UNIT-I
Importance Importance is not given to data but to functions Importance is given to the data rather than
procedures
Approach FOP follows top down approach OOP follows bottom up approach
Access Specifiers Does not have any access specifier Has three access specifiers, namely
Public, Private, Protected
Data Moving Data can move freely from function to function in the Objects can move and communicate with
system each other
Maintainability To add new data and function is not so easy Provides an easy way to add new data and
function
Data Access Function uses global data for sharing that can be accessed Object uses local data and can be
freely from function to function accessed in a control manner
in the system.
Data Hiding No data hiding is possible, hence security is not possible Provides data hiding, hence secured
programming is possible
Overloading Polymorphism is not possible Polymorphism is possible
Examples C, Visual Basic, FORTRAN, Pascal. C++, JAVA, Python, VB.NET, C#.NET.
Understanding Object Oriented Development…
• Object-oriented programming (OOP) is a programming
paradigm that uses “Objects “and their interactions to design
applications.
• It simplifies the software development and maintenance by
providing some concepts:
• Object
• Class
• Data Abstraction & Encapsulation
• Inheritance
• Polymorphism
• Objects are the basic run time entities in an object- oriented system.
They may represent a person, a place, a bank account, a table of
data or any item that the program has to handle.
Understanding Object Oriented Development…
• Class: The entire set of data and code of an object can be made of a
user defined data type with the help of a class.
• In fact, Objects are variables of the type class. Once a class has been
defined, we can create any number of objects belonging to that class.
• Classes are data types based on which objects are created.
Objects with similar properties and methods are grouped together
to form a Class.
• Thus, a Class represents a set of individual objects.
• Characteristics of an object are represented in a class as Properties.
The actions that can be performed by objects become functions of
the class and is referred to as Methods.
• A class is thus a collection of objects of similar type. For example,
mango, apple, and orange are members of the class fruit. Statement
fruit mango; will create an object mango belonging to the class fruit.
Understanding Object Oriented Development…
• Data Abstraction & Encapsulation:
• Abstraction refers to the act of representing essential features
without including the background details or explanations.
• Since the classes use the concept of data abstraction ,they are
known as abstraction data type(ADT).
• For example, a class Car would be made up of an Engine, Gearbox,
Steering objects, and many more components.
• To build the Car class, one does not need to know how the different
components work internally, but only how to interface with them.
• Humans manage complexity through abstraction. When you drive
your car, you do not have to be concerned with the exact internal
working of your car (unless you are a mechanic).
Encapsulation in
Java