CS532 Chapter I Spring 2024
CS532 Chapter I Spring 2024
School of Computer
Science & Technology
Object Oriented Programming (with Java) – CS 532
Tariku Worku
Spring 2024
Chapter I: Introduction to Programming Paradigms & OOP
▪ In this chapter:
– What is OOP
– Overview of Programming Paradigms
– Evolution of OOP (SIW)
– Basic Concepts in OOP
– Benefits of OOP
– Setting Up The Development Environment (for Java)
– Types of Application Using Java (Additional)
6/25/2024 2
What is OOP?
▪ Object-oriented programming is a
programming paradigm, or
classification, that organizes a group of
data or attributes or properties with
functions or methods into a unit, known
as a class which gets to be instantiated
to a real-world entity referred to as
OBJECT.
6/25/2024 3
Programming Paradigms
▪ A programming paradigm is a
fundamental style or approach
to programming that guides
the structure and organization
of code. It encompasses a set
of principles, concepts, and
practices that define how
software is designed,
implemented, and managed.
6/25/2024 4
Procedural Vs. Object
PO OO
▪ Program divided into small parts: functions. ▪ Program divided into small parts: objects.
▪ Follows top-down approach. ▪ Follows bottom-up approach.
▪ Has no access controllers. ▪ Has access controllers e.g. private, protected, public...
▪ Hard to add new data and function. ▪ Easy to add new data and function.
▪ Supports encapsulation & inheritance.
▪ No support for encapsulation & inheritance.
▪ Overloading is possible
▪ Overloading not possible.
▪ Data is more important.
▪ Function is more important.
▪ Real-world representation.
▪ Fictional representation.
▪ For large & complex programs & applications.
▪ For medium sized & non-complex programs & applications. ▪ Focus on data abstraction
▪ Focus on procedure abstraction ▪ E.g. C++, Java, Python, C#, etc.
▪ E.g. C, FORTRAN, Pascal, Basic, etc.
6/25/2024 5
Evolution of OOP – (Students’ Reading Work)
6/25/2024 6
Basic Concepts of OOP
6/25/2024 7
Basic Concepts of OOP … contd.
6/25/2024 8
Basic Concepts of OOP … contd.
6/25/2024 9
Basic Concepts of OOP … contd.
6/25/2024 10
Basic Concepts of OOP … contd.
6/25/2024 11
Basic Concepts of OOP … contd.
6/25/2024 12
Basic Concepts of OOP … contd.
6/25/2024 17
Benefits of OOP
6/25/2024 20
Types of Applications Using Java
6/25/2024 21
Structure of a Simple/Common Java Application
6/25/2024 22
6/25/2024 23