0% found this document useful (0 votes)
3 views19 pages

OOP Chapter 1

The document provides an overview of Object Oriented Programming (OOP), defining it as a programming paradigm based on objects that contain data and methods. It covers fundamental principles of OOP such as encapsulation, abstraction, inheritance, and polymorphism, as well as features of the Java programming language and the role of the Java Virtual Machine (JVM) in executing Java programs. Additionally, it lists popular OOP languages and tools for writing Java programs.

Uploaded by

kerimadafis
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
3 views19 pages

OOP Chapter 1

The document provides an overview of Object Oriented Programming (OOP), defining it as a programming paradigm based on objects that contain data and methods. It covers fundamental principles of OOP such as encapsulation, abstraction, inheritance, and polymorphism, as well as features of the Java programming language and the role of the Java Virtual Machine (JVM) in executing Java programs. Additionally, it lists popular OOP languages and tools for writing Java programs.

Uploaded by

kerimadafis
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
You are on page 1/ 19

Object Oriented Programming (OOP)

Ambo University Waliso Campus

Information Science Department

05/11/2025 OOP -1-


Introduction of OOP
 Contents
o Definition of OOP
o Overview of OO principles
o Java Features
o JVM, Byte code, and Code execution in java

05/11/2025 OOP 2
Definition of OOP
• Object-oriented programming (OOP) is a programming
paradigm based on the concept of objects, which may
contain data, in the form of fields, often known as
attributes; and code, in the form of procedures, often
known as methods
• Object means a real word entity such as dog, cat, cattle,
goat, sheep , pen, chair, table etc.
• Object-Oriented Programming is a methodology or
paradigm to design a program using classes and objects.

05/11/2025 OOP 3
...con’t
• Collection of objects is called class. It is a logical entity.
• A class can be defined as a template/blueprint that describes the
behaviour /state that the object of its type support.
• If we consider a dog, then its state is - name, breed, color, and the
behaviour is - barking, wagging the tail, running.
 Popular Java Editors
o To write Java programs, we need any of the following:
o notepad - Text editor
o NetBeans - A Java IDE that is open-source and free
o eclipse - A Java IDE developed by the eclipse open-source
community
05/11/2025 OOP 4
...con’t
Following is an example of a class.
public class Dog
{
String breed;
int age;
String color;
void barking()
{
}
}

05/11/2025 OOP 5
…con’t

05/11/2025 OOP 6
…con’t
 List of object-oriented programming languages

o C++, C#, Java,


o PHP, Python, Ruby,
o Scala, Smula, SmallTalk,
o LISP, COBOL, COBRA

05/11/2025 OOP 7
Overview of OO Principles
 Fundamental principles of Object Oriented Programming

o Encapsulation it is used to protect, consistency, and allow change.


o Abstraction
o Inheritance
o Polymorphism

05/11/2025 OOP 8
Con’t
 Fundamental Principles of Object Oriented Programming

o Encapsulation
o Abstraction
o Inheritance
o Polymorphism

05/11/2025 Dataset Clarification 9


Con’t…
 Fundamental Principles of Object Oriented Programming

o Encapsulation
o Abstraction
o Inheritance
o Polymorphism

05/11/2025 Dataset Clarification 10


Con’t

05/11/2025 OOP 11
Con’t
 Fundamental principles of Object Oriented Programming

o Polymorphism it is achieved by using different technique named


method overloading and method overriding.
o Encapsulation
o Abstraction
o Inheritance

05/11/2025 OOP 12
Java Features
• Key features of the java language
– Simplicity
– Portable
– Flexible
– Reusabiity
– Java program is both compiled and interpreted.
– Write once, run anywhere

05/11/2025 OOP 13
Con’t

05/11/2025 OOP 14
Con’t

05/11/2025 OOP 15
JVM, Byte code and Code execution in java
• The Java Runtime Environment (JRE) is a set of
software tools for development of Java applications.
• It combines the Java Virtual Machine (JVM), platform
core classes and supporting libraries.
• The JVM is a program that provides the runtime
environment necessary for Java programs to execute.
• Java programs cannot run without JVM for the
appropriate hardware and OS platform.

05/11/2025 OOP 16
Con’t
• When the JVM takes in a Java program for
execution, the program is not provided as Java
language source code.
• Instead, the Java language source must have been
converted (or compiled) into a form known as Java
bytecode.
• Java bytecode must be supplied to the JVM
in a format called class files.

05/11/2025 OOP 17
Con’t
• These class files always have a .class extension.
• The JVM is an interpreter for the bytecode form
of the program. It steps through one bytecode
instruction at a time.
• It is an abstract computing machine that enables a
computer to run a Java program.

05/11/2025 OOP 18
thanks

Thanks a lot

05/11/2025 OOP 19

You might also like