Programming In: Revised 2 Edition
Programming In: Revised 2 Edition
Java
Revised 2nd Edition
Sachin Malhotra & Saurabh Choudhary
• Applications of OOP
• Not extensible
• Objects
• Abstraction
• Encapsulation
• Inheritance
• Polymorphism
• For examples, Furniture do not have any existence but tables and
chairs do exist.
• For example the attributes of student are name, roll number etc.
• Synonym to functions.
© Oxford University Press 2018. All rights reserved.
Abstraction
• In real life, humans manage complexity by abstracting details away.
• Have two types of classes: one is base class and other is subclass.
• For example, we can categorize vehicle into car, bus, scooter, ships,
planes etc.
• What is an object?
Employee
Class
name
address
designation
salary
Attributes
addEmployee
deleteEmployee
searchEmployee
Behavior
:Employee
Object
name=peter
address=NY
designation=manager
salary=10000
Attributes
addEmployee
deleteEmployee
searchEmployee
• One-to-one
• One-to-many
• Many-to-many
• Artificial Intelligence
• Expert Systems
• Neural Networks
• Database Management
• Mobile Applications