1. OOP - JAVA
Introduction to OOP using Java
4/6/2022 1
Department of Computer
PRO – GRADE 5
Lecturer. OMEED M. M
2. Table of contents
What is OOP?
Classes and Objects
Types of the access specifies
List of OOP Concepts in Java
4/6/2022 2
3. What is OOP?
OOP stand for Object-Oriented Programming
Object-Oriented Programming is a methodology or paradigm to
design a program using classes and objects. It simplifies software
development and maintenance by providing some concepts.
Languages used in Object Oriented Programming:
Java, C++, C#, Python,
PHP, JavaScript, Ruby, Perl,
Objective-C, Dart, Swift, Scala
4/6/2022 3
4. Class and Object
What are Classes and Objects?
Classes and objects are the two main aspects of object-oriented
programming.
4/6/2022 4
5. Class and Object
Object
Objects have states and behaviors. Example: A dog has states - color,
name, breed as well as behaviors – wagging the tail, barking, eating.
An object is an instance of a class.
Everything is an object
4/6/2022 5
7. Class and Object
Class
- Collection of objects is called class. It is a logical entity.
- A class can be defined as a template/blueprint that
describes the behavior/state that the object of its
type support.
4/6/2022 7
9. Types of the access specifies
There 3 types of the access specifies
1. Public: accessible in all class in your application.
2. protected: accessible within the package in which it is defined
and in its subclass(es)(including subclasses declared outside the
package)
3. Private: accessible only within the class in which it is defined.
4/6/2022 9
10. List of OOP Concepts in Java
1. Abstraction
2. Encapsulation
3. Inheritance
4. Polymorphism
4/6/2022 10
11. Conclusion
The main idea behind Object Oriented Programming is simplicity,
code reusability, extendibility, and security. These are achieved
through Encapsulation, abstraction, inheritance, and polymorphism.
For a language to be classified as OOP, it must have these 4 OOP
blocks
4/6/2022 11