OBJECT ORIENTED PROGRAMMING
PROF. ASHRAF AL-MARAKEBY
COURSE OBJECTIVES
1. Understand the basic concepts OOP.
2. Aware of software design techniques.
3. Capable of minimizing development effort and maximizing reusability
4. Design and implement software programs with different Object-oriented elements
5. Utilize codes of practice, programming standards and quality guidelines to assist in
building robust software systems
COURSE MATERIALS AND TOOLS
1. An Introduction to Object-Oriented Programming with Java Fifth Edition, C. Thomas Wu
2. Lecture notes by the lecturer
3. On-line tutorials , code, videos , courses ,….etc
Tools
1. Java SDK
2. Eclipse IDE
3. NetBeans IDE
COURSE SYLLABUS
1. Introduction to OOP
2. Inheritance
3. Polymorphism
4. Encapsulation
5. Software abstraction and contracts
COURSE SYLLABUS (CONT.)
6. Collections
7. Generics
8. Design patterns
9. UML
10. Multi-threading
EVALUATION METHOD
•70 % final
•15 % Mid Term Exam
•5% Quizzes
•10 % Projects and Activities
WHAT IS OOP (OBJECT-ORIENTED PROGRAMMING)?
•A programming paradigm based on the concept of objects.
•Objects = data (attributes) + behavior (methods).
•Programs are organized around real-world entities
instead of functions only.
KEY PRINCIPLES OF OOP
•Encapsulation: bundling data and methods together,
hiding internal details.
•Abstraction: focusing on essential features, hiding
complexity.
•Inheritance: reusing and extending existing classes.
•Polymorphism: one interface, many implementations.
ADVANTAGES OF OOP
•Easier to design programs similar to the real world.
•Code reusability through classes and inheritance.
•Better maintainability and scalability.
•Improved readability and modularity.
•Promotes teamwork and large-scale software development.
COMPARISON WITH OLD PARADIGMS
•Procedural Programming (C style):
•Focuses on functions and step-by-step instructions.
•Data and functions are separate.
•Hard to maintain large systems.
COMPARISON WITH OLD PARADIGMS (CONT.)
• Functional Programming (Lisp, Haskell, JavaScript style):
• Focuses on pure functions and immutability.
• Avoids changing state and side effects.
COMPARISON WITH OLD PARADIGMS (CONT.)
•Object-Oriented Programming (Java, C++, Python, etc.):
•Combines data + behavior into objects.
•Easier modeling of real-world systems.
SDLC (SOFTWARE DEVELOPMENT LIFE CYCLE)
Phases of building software:
• Requirement Analysis – understand what to build.
• System Design – plan architecture, modules, and data flow.
• Implementation (Coding) – develop using OOP or other
paradigms.
• Testing – verify and fix errors.
• Deployment – release to users.
• Maintenance – update and improve over time.
WATERFALL MODEL
AGILE
Effort of Software Phases
OOP IN THE SOFTWARE DEVELOPMENT LIFE CYCLE (SDLC)
•Requirement Analysis: OOP helps model requirements as real-world objects.
•Design: Classes and objects represent system components; UML diagrams aid planning.
•Implementation: Code is modular and reusable through encapsulation and inheritance.
•Testing: Easier unit testing because each class can be tested independently.
•Deployment: Object-oriented design supports scalable and maintainable software.
•Maintenance: Extending or modifying features is easier due to reusability and modularity.
Objects
Object = real world runtime entity, for example,
student, button, text, customer, screen,...
Objects communicate with each other thru events/calls
Objects
❑ An object is a thing.
❑ Example of Objects
John Mary 238-49-1357
Customer Dog Account Object name
Object ‘type’
OO PROGRAMMING
l Object 2
l Object 1
messages
l Data l Data
l Function l Function
m
es
sa
ge
s Object 3 es
ag
l
s
es
m
l Data
l Function
l Classes
Classes are abstraction constructs, that define objects of the same type.
A class provides a special type of methods, known as constructors, which are
invoked to construct objects from the class.
A Java class uses variables to define data fields and methods to define
behaviors.
Audi-2020 BMW -2021 Ferrari-2000
Car Factory
Objects
CLASSES AND OBJECTS