Module 5 Introduction To Object Oriented Programming
Module 5 Introduction To Object Oriented Programming
(Java)
Module 5
Introduction to Object Oriented
Programming
Learn the behavior and concepts of object and classes.
Understand the concept of Object Orient Design
Learn to use JDeveloper in designing objects relations
Apply different rules in designing Class Diagram given
some relations
5.1
Programming Model:
Ø Procedural Programming
is a technique of solving a problem and
breaking it down into smaller parts and
solving each of the smaller problems.
ØProcedural Programming
ØObject-Oriented Programming
ØObject-Oriented Programming
Benefits of OOP:
Ø Reduced software complexities and realistic
modelling through the use of various
techniques:
Benefits of OOP:
Ø Reduced software complexities and realistic
modelling through the use of various
techniques:
Benefits of OOP:
Ø Software reusability by implementing
inheritance. Programs are built that can be
used by several other applications.
Inheritance – allows an object to extend its
characteristics to another object.
Benefits of OOP:
Ø Resilience to change with the use of
polymorphism.
Polymorphism – ability to process objects
differently depending on their data type or class.
123
245
245
Class (Car)
Object Relationships:
Ø Association – exists when an object contains a
reference to another object. Referred to as the
“has a” relationship.
Teacher “has a” Student
Object Relationships:
Ø Inheritance – referred to as the “kind of” or “is
a” relationship.
Person
“is a” “is a”
Teacher Student
Object Relationships:
Øsuperclass (base class) – the parent class
from which properties are inherited by another
class
Øsubclass (derived class) – a new class with
properties taken from a parent class
Øabstract class – a well-encapsulated
conceptual class. The objects of this class do
not exist in real world
Introduction to Object Oriented Programming
CONCEPT OF OOP
Class Diagram
A class diagram is used to describe the
attributes and behaviours of objects in the
system.
Customer
-CustomerID: Long Attributes
+Name: String
+DOB: Date
Class Name
Syntax:
<access> <datatype> <attributeName>;