POP versus OOP and the Four Principles of Object Oriented Programming (ICSE Class 9)
Updated 18 October 2026 · Fact-checked
Procedure oriented programming (POP) splits a program into functions that share data; object oriented programming (OOP) splits it into objects that bundle data with the methods that use it. OOP rests on four principles: data abstraction (show only the essentials), encapsulation (wrap data and methods into one protected unit), inheritance (a class acquires the features of another) and polymorphism (one name, many forms).
Understand POP versus OOP and the Four Principles of OOP with Examples
Procedure oriented programming (POP). The program is divided into procedures (functions). Data is often shared among many functions, so any function can change it. Typical languages: C, BASIC, FORTRAN.
Object oriented programming (OOP). The program is divided into objects. Each object holds its own data (attributes) together with the methods that work on it, and the data is reached through those methods. Typical languages: Java, C++, Python.
Differences to quote.
1. Focus: POP focuses on the steps (procedures); OOP focuses on the objects and their data.
2. Data security: in POP data is exposed to many functions; in OOP data is hidden inside objects.
3. Approach: POP is usually top-down; OOP is bottom-up.
4. Reuse: OOP supports reuse through inheritance; POP programs are harder to extend.
5. Modelling: OOP models real entities (a student, an account) directly.
The four principles.
- Data abstraction. Showing only the essential features and hiding the background details. A driver uses the steering and pedals without knowing how the engine works; a programmer calls System.out.println() without knowing how it reaches the screen.
- Encapsulation. Wrapping data and the methods that operate on it into one unit (a class) and protecting the data from direct outside access. A medicine capsule holds its contents in one shell; a class Account keeps balance private and changes it only through deposit() and withdraw().
- Inheritance. A new class acquires the properties and methods of an existing class. The existing class is the base (parent or super) class and the new one is the derived (child or sub) class, which can add features of its own. In Java: class Car extends Vehicle.
- Polymorphism. The ability of one name or action to take many forms. A person is a student at school and a customer in a shop; in Java one method name area() can find the area of a circle or of a rectangle depending on the data given.
Telling abstraction and encapsulation apart. Abstraction is about what the user is shown (essentials only). Encapsulation is about how the data and methods are packed and protected. Quote a keyword for each: hiding the details, wrapping and protecting, acquiring, many forms.
How to answer. Define the principle in one sentence and then give one real-life example and, if asked, one Java example; a bare definition loses a mark.
Neighbouring topics: Java tools, the compilation process and Java's features are on the next page of this chapter.
POP versus OOP and the Four Principles of OOP with Examples: key facts
- POP versus OOP
- POP: procedures, shared data, top-down | OOP: objects (data + methods), hidden data, bottom-up
- Give at least two differences.
- Four principles
Abstraction essentials only Encapsulation wrap and protect Inheritance acquire from a parent Polymorphism one name, many forms - Always add an example.
- Keywords to match
hiding details abstraction wrapping and protecting encapsulation base and derived class inheritance same name different behaviour polymorphism - Use these to identify a principle.
POP versus OOP and the Four Principles of OOP with Examples in real life
The idea, met in an everyday situation. Answer the question in your own words, then compare with the model answer. The one-line hook is what to remember.
Inheritance and polymorphism together
Suppose a game has a class Vehicle with a method move(). A class Boat is derived from Vehicle and a class Cycle is derived from Vehicle; move() shows sailing for a boat and pedalling for a cycle.
Which principles are used and where?
Try it first, then show the solutionSolution
- Boat and Cycle acquire the features of Vehicle: inheritance.
- The same message move() gives different behaviour for each: polymorphism.
Answer: Inheritance (Boat and Cycle from Vehicle) and polymorphism (move() behaves differently).
Memory hook: Acquire from the parent, then change the behaviour.
Encapsulation and abstraction
Imagine a vending machine where you press a code and a button; the coins and stock are locked inside.
Which principle is shown by the locked coins and which by the simple buttons?
Try it first, then show the solutionSolution
- Coins and stock are wrapped inside one machine and protected: encapsulation.
- The user sees only the essential buttons: abstraction.
Answer: Locked coins and stock: encapsulation. Simple buttons that hide the mechanism: data abstraction.
Memory hook: Locked inside is encapsulation; the buttons are abstraction.
Tricks to remember POP versus OOP and the Four Principles of OOP with Examples
Short memory aids. Say each one aloud once, then use it on a question the same day.
A PIE
Abstraction, Polymorphism, Inheritance, Encapsulation.
Use it when: Listing the four principles.
Capsule and car
A capsule wraps its contents (encapsulation); a car shows only its controls (abstraction).
Use it when: Separating the two.
Top-down, bottom-up
POP breaks a task downwards; OOP builds objects upwards.
Use it when: The approach difference.
POP versus OOP and the Four Principles of OOP with Examples: solved examples
Ordered from board level to HOTS. Try each one before you open the solution.
Example 1: Spot the principle · 1 mark · MCQBoard level
A class Circle and a class Square both have a method area(), and calling area() gives the correct formula for each shape. Which principle is this?
(a) Encapsulation (b) Inheritance (c) Polymorphism (d) Data abstraction
Try it first, then show the solutionSolution
- One method name takes different forms for different classes.
Answer: (c) Polymorphism
Example 2: Assertion and reason · 1 mark · Assertion-reasonHarder board level
Assertion (A): Encapsulation and data abstraction mean the same thing.
Reason (R): Both of them hide information from the user.
(a) Both A and R are true and R is the correct explanation of A. (b) Both A and R are true but R is not the correct explanation of A. (c) A is true but R is false. (d) A is false but R is true.
Try it first, then show the solutionSolution
- Abstraction shows only the essentials; encapsulation wraps data with methods and protects it, so A is false.
- Both do restrict what an outsider sees, so R is true as a statement.
Answer: (d) A is false but R is true.
Example 3: Four scenarios · 4 marks · Short answerHarder board level
Name the principle shown in each: (i) a bank app shows only "Pay" and "Check balance" buttons; (ii) a class Student keeps marks private and changes them only through setMarks(); (iii) a class Teacher is created from the class Employee and adds a subject; (iv) the same method name draw() is used for a Circle and a Square.
Try it first, then show the solutionSolution
- (i) The user sees only the essentials: data abstraction. (1 mark)
- (ii) Data and method wrapped and protected: encapsulation. (1 mark)
- (iii) Teacher acquires the features of Employee: inheritance. (1 mark)
- (iv) One name, different forms: polymorphism. (1 mark)
Answer: (i) abstraction (ii) encapsulation (iii) inheritance (iv) polymorphism
Example 4: Case study: a school app · 4 marks · Case-basedHOTS / competency
A school plans a result app in Java. The class Student has private marks and a method showResult(). The class HostelStudent is created from Student and adds a room number. The app shows teachers only the "Enter marks" and "Print" options.
(i) Which principle is shown by private marks and showResult()? (1)
(ii) Name the base and the derived class. (1)
(iii) Which principle is shown by the two options for teachers? Justify. (2)
Try it first, then show the solutionSolution
- (i) Encapsulation: data and method in one class with the data protected.
- (ii) Base class: Student; derived class: HostelStudent.
- (iii) Data abstraction: only the essential operations are shown and the working is hidden.
Answer: (i) encapsulation (ii) Student is the base, HostelStudent the derived class (iii) data abstraction
Example 5: Why OOP suits a school system · 3 marks · Short answerHarder board level
A programmer must write software that stores students, teachers and classrooms and lets new kinds of staff be added later. Give three reasons why an object oriented design suits this better than a procedure oriented one.
Try it first, then show the solutionSolution
- Students, teachers and rooms are real entities; OOP models each as an object with its own data and methods. (1 mark)
- The data of each object is hidden and changed only through its methods, so it is safer than data shared by many functions. (1 mark)
- A new kind of staff can be created from an existing class by inheritance, so existing code is reused. (1 mark)
Answer: Models real entities, hides data in objects, and reuses code through inheritance (any three valid points).
Where students lose marks in POP versus OOP and the Four Principles of OOP with Examples
The slips examiners see most often, and what to write instead.
Mistake: Defining abstraction as hiding data
The two principles are confused.
Wrong working
Abstraction means making data private in a class.
Right working
Abstraction shows only the essentials; encapsulation wraps and protects data.
Do this: Use the keywords "essentials only" and "wrap and protect".
Usually costs: 1 mark
Mistake: Definition without an example
Only the textbook line is learnt.
Wrong working
Inheritance is acquiring properties.
Right working
Inheritance is acquiring properties; example: Smartphone from Phone.
Do this: Add one example to every principle.
Usually costs: 1 mark each
Mistake: Listing one-sided differences
Only one language is described.
Wrong working
POP is faster.
Right working
POP focuses on procedures and shared data; OOP focuses on objects with hidden data.
Do this: Compare both sides on the same point.
Usually costs: 1 mark
Exam tips
- Always pair a principle with a real-life example.
- For differences, use a point-by-point comparison.
- Name base and derived classes correctly in inheritance questions.
- Quote the matching keyword in scenario questions.
Practice questions on POP versus OOP and the Four Principles of OOP with Examples
Write each answer on paper first. Open the hint only if you are stuck, and the answer only when you have finished.
Q1 · 1 mark · MCQBoard level
Which one is a procedure oriented language?
(a) Java (b) C (c) C++ (d) PythonHint
Check the list of POP languages.
Answer
(b) C
Q2 · 2 marks · Very short answerBoard level
Give one real-life example and one Java example of polymorphism.
Hint
One name, many forms.
Answer
Real life: a person is a student at school and a customer in a shop. Java: one method name area() finds the area of a circle or of a rectangle depending on the data it is given.
Q3 · 1 mark · Very short answerBoard level
A map app shows only a "Start" button and the route, and hides how the route was calculated. Identify the principle.
Hint
Only essentials are shown.
Answer
Data abstraction.
Q4 · 3 marks · Short answerHarder board level
A class BankAccount keeps balance hidden and offers only deposit() and withdraw(). Explain how this shows (i) encapsulation and (ii) data abstraction.
Hint
Packing versus what is shown.
Answer
(i) The data (balance) and the methods that work on it are wrapped in one class and the data is protected from direct access. (ii) The user sees only the essential operations deposit() and withdraw(); how the balance is stored and checked is hidden.
Q5 · 3 marks · Short answerHOTS / competency
A hospital program has a class Patient with private data and a method viewRecord(). A class ICUPatient adds oxygen level. State two principles and justify each.
Hint
Private data; reuse of an existing class.
Answer
Encapsulation: the record and viewRecord() are wrapped in Patient with the data protected. Inheritance: ICUPatient acquires everything of Patient and adds its own feature.
Test your recall
Answer in your head or on paper first, then open the card. Pulling an answer out of memory makes it stick far better than re-reading.
1.Which approach does OOP follow, top-down or bottom-up?Show answer
Bottom-up.
2.Name the four principles of OOP.Show answer
Abstraction, encapsulation, inheritance, polymorphism.
3.What is a derived class?Show answer
A class that acquires the features of a base class.
4.Which principle means one name, many forms?Show answer
Polymorphism.
5.Which language here is procedure oriented: C or Java?Show answer
C
6.Give a real-life example of encapsulation.Show answer
A medicine capsule or an ATM.
POP versus OOP and the Four Principles of OOP with Examples: frequently asked questions
Is Java purely procedure oriented?
No. Java is an object oriented language.
Do I need Java code for the principles?
The syllabus asks for real-life examples; a short Java example earns extra clarity.
Which principle reduces repeated code?
Inheritance, because a new class reuses an existing one.