Skip to content
Computer ApplicationsICSE Class 10 · Introduction to Object Oriented Programming Concepts

Four Principles of Object Oriented Programming (ICSE Class 10 Computer Applications)

Updated 17 October 2026 · Fact-checked

The four principles of OOP are data abstraction (show only the essential features), encapsulation (bind data and methods together in a class and protect the data), inheritance (a new class acquires the features of an existing class) and polymorphism (one name, many forms). Procedure oriented programming focuses on functions; OOP focuses on objects that hold data and the methods that work on it.

Understand Four Principles of OOP

Procedure oriented programming (POP) divides a program into procedures (functions) that are called one after another. Data is usually shared by all the functions, so one careless function can damage it. Programs are written top-down. Languages such as C and Pascal are examples.

Object oriented programming (OOP) divides a program into objects. An object bundles its data (state) with the methods (behaviour) that act on that data. Programs are written bottom-up: first the classes, then the program that uses them. Java is an object oriented language.

1. Data abstraction. Showing only the essential features of something and hiding the details of how it works. A driver uses the steering wheel, accelerator and brake; the working of the engine is hidden. In a class, the user calls a method and need not know its code.

2. Encapsulation. Wrapping the data and the methods that use it into one unit, the class, and controlling access to the data (data hiding). A medicine capsule holds its contents inside a covering. In Java the instance variables are kept private and reached through public methods.

3. Inheritance. The process by which one class (the sub class or derived class) acquires the properties and methods of another (the super class or base class). It gives reusability: common code is written once. A child inherits features from parents; a Car and a Bus both inherit from Vehicle.

4. Polymorphism. Poly means many, morph means form. One name or operator behaves in different ways in different situations. The + sign adds numbers (3 + 4 gives 7) and joins strings ("ab" + "cd" gives abcd). In Java, method overloading (same method name, different parameter lists) is the form of polymorphism met in Class X.

Abstraction vs encapsulation. Abstraction decides *what to show* (the outside view). Encapsulation decides *how to pack and protect* (the inside implementation). Examiners often ask for this difference.

The syllabus asks for all four principles to be defined and explained with real-life examples, and for the difference between POP and OOP.

Four Principles of OOP: key facts

The four principles
  • Data abstraction
  • Encapsulation
  • Inheritance
  • Polymorphism
Learn them in this order; A-E-I-P.
Key word of each principle
Abstractionhide details, show essentials
Encapsulationwrap data and methods, hide data
Inheritancereuse by acquiring
Polymorphismone name, many forms
Start every definition with the key word.
POP vs OOP
POPfunctions are important
OOPobjects are important
POPtop-down
OOPbottom-up
POPdata is open to all functions
OOPdata is hidden inside objects
Give at least three pairs for a 3-mark answer.
Polymorphism in Java (Class X)
  • Method overloading
  • Same name
  • Different number or types of parameters
A change of return type alone does not overload a method.

How to answer Four Principles of OOP questions

Use this routine for definition and real-life questions.

  1. 1Name the principle and give a one-line definition using its key word.
  2. 2Add a real-life example in one sentence and say which part of it matches the principle.
  3. 3If asked about Java, add one line on how Java shows it (private data, extends, overloading).
  4. 4For differences, write two columns and give one matching pair per mark.
  5. 5For identification questions, ask: is something hidden (abstraction), packed (encapsulation), acquired (inheritance) or multi-form (polymorphism)?

Four Principles of OOP 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.

Abstraction and encapsulation in a vending machine

Suppose a school canteen has a snack machine with three buttons (choose, pay, collect). Inside are motors, counters and a coin box that the students never see.

Which principle is shown by the three buttons and which by the closed metal body?

Try it first, then show the solutionSolution
  1. The buttons give only what the student needs: that is data abstraction.
  2. The closed body keeps the coin box and motors inside and allows access only through the buttons: that is encapsulation (data hiding).

Answer: Three buttons: abstraction. Closed body with controlled access: encapsulation.

Memory hook: Buttons show, the box protects.

Inheritance and polymorphism in a class of vehicles

Imagine a transport program with a class Vehicle (fields speed and fuel) and classes Car and Bus that reuse these fields, while each prints its own message when start() is called.

Name the two principles at work and the part of the program that shows each.

Try it first, then show the solutionSolution
  1. Car and Bus acquire speed and fuel from Vehicle: inheritance.
  2. The same call start() gives a different result for Car and Bus: polymorphism.

Answer: Reusing Vehicle fields: inheritance. Same name start() behaving differently: polymorphism.

Memory hook: Family traits are inherited; one name, many behaviours.

Tricks to remember Four Principles of OOP

Short memory aids. Say each one aloud once, then use it on a question the same day.

  • A-E-I-P: A Easy IP

    Take the initials in the order A-E-I-P: Abstraction, Encapsulation, Inheritance, Polymorphism. Read them as "A Easy IP" to recall the four names in the same order as the formulas list.

    Use it when: Recalling the four names in an MCQ or list.

  • Hide, Pack, Pass, Pose

    Abstraction hides details, encapsulation packs data, inheritance passes features down, polymorphism poses in many forms.

    Use it when: One-word definitions.

  • Objects over functions

    POP puts functions in front; OOP puts objects in front.

    Use it when: Difference questions.

Four Principles of OOP: solved examples

Ordered from board level to HOTS. Try each one before you open the solution.

Example 1: Difference between POP and OOP · 3 marks · Short answerBoard level

A shop billing program can be written in a procedure oriented style or an object oriented style. Compare how the two styles organise the program, and say which keeps the price list safer (3 marks).

Try it first, then show the solutionSolution
  1. Focus: POP concentrates on procedures (functions); OOP concentrates on objects that combine data and methods. (1 mark)
  2. Approach and security: POP is top-down and data is shared by all functions so it is less secure; OOP is bottom-up and data is hidden inside objects. (1 mark)
  3. Examples: POP: C, Pascal; OOP: Java. (1 mark)

Answer: POP: function-centred, top-down, data open to all functions (C, Pascal). OOP: object-centred, bottom-up, data hidden in objects (Java).

Example 2: Identify the principle · 4 marks · Short answerHarder board level

Name the OOP principle shown in each case:
(i) A mobile phone user taps the camera icon without knowing how the image is processed.
(ii) A Student class keeps marks private and gives public methods to set and read them.
(iii) A class Teacher uses name and age fields written once in a class Person.
(iv) The method area(int s) and area(int l, int b) share one name.

Try it first, then show the solutionSolution
  1. (i) Processing details are hidden, only the essential icon is shown: data abstraction. (1 mark)
  2. (ii) Data and methods packed in a class, data protected: encapsulation. (1 mark)
  3. (iii) Features acquired from an existing class: inheritance. (1 mark)
  4. (iv) One method name with different parameter lists: polymorphism (method overloading). (1 mark)

Answer: (i) Abstraction (ii) Encapsulation (iii) Inheritance (iv) Polymorphism

Example 3: Abstraction versus encapsulation · 3 marks · Short answerHarder board level

A student says "abstraction and encapsulation are the same because both hide something". Explain the difference with one example, in 3 marks.

Try it first, then show the solutionSolution
  1. Abstraction works at the design level: it decides which features are shown to the user and leaves out the rest of the detail. (1 mark)
  2. Encapsulation works at the implementation level: it wraps data and methods into a class and uses private access to protect the data. (1 mark)
  3. Example: in an ATM the screen offers only withdraw, deposit and balance (abstraction); the account data and the cash logic sit inside the machine and can be reached only through those options (encapsulation). (1 mark)

Answer: Abstraction = showing only the essential view; encapsulation = packing data with methods and restricting access to the data.

Example 4: Case study: a library program · 4 marks · Case-basedHOTS / competency

A library program has a class Item with fields title and code. Classes Book and Magazine are written by reusing Item. Each of Book and Magazine has its own method show(), and the librarian only calls show() without knowing how it works. The fields of Item can be changed only by the methods of Item.
(i) Which principle is shown by Book and Magazine reusing Item? (1)
(ii) Which principle is shown by the fields being changed only through methods? (1)
(iii) Which principle is shown when one call show() acts differently for Book and Magazine? (1)
(iv) Which principle is shown by the librarian not needing to know how show() works? (1)

Try it first, then show the solutionSolution
  1. (i) Acquiring features of an existing class: inheritance.
  2. (ii) Data reachable only through the class methods: encapsulation.
  3. (iii) The same method name behaving differently: polymorphism.
  4. (iv) Implementation hidden from the user: data abstraction.

Answer: (i) Inheritance (ii) Encapsulation (iii) Polymorphism (iv) Abstraction

Example 5: Why inheritance helps · 3 marks · Short answerHarder board level

A company writes separate classes Car, Bus and Truck, each with identical fields speed, fuel and model. State a better design using an OOP principle and two benefits.

Try it first, then show the solutionSolution
  1. Write the common fields once in a super class Vehicle and make Car, Bus and Truck sub classes of it: inheritance. (1 mark)
  2. Benefit 1: reusability, since the code is written and tested once. (1 mark)
  3. Benefit 2: easier maintenance, since a change in Vehicle reaches all sub classes. (1 mark)

Answer: Use inheritance with a super class Vehicle; it gives code reusability and easier maintenance.

Where students lose marks in Four Principles of OOP

The slips examiners see most often, and what to write instead.

  • Mistake: Defining polymorphism as "many forms" only

    The bare translation of the word earns no mark without the programming meaning.

    Wrong working

    Polymorphism means many forms.

    Right working

    Polymorphism means one name (a method or operator) behaving in different ways in different situations, for example method overloading.

    Do this: Add the programming meaning and an example.

    Usually costs: 1 mark

  • Mistake: Mixing up abstraction and encapsulation

    Both involve hiding, but abstraction hides complexity of working while encapsulation packs data and restricts access to it.

    Wrong working

    Abstraction is wrapping data and methods into a class.

    Right working

    Encapsulation is wrapping data and methods into a class; abstraction is showing only essential features.

    Do this: Link wrapping with encapsulation and essential-only with abstraction.

    Usually costs: 1 to 2 marks

  • Mistake: Giving a difference with only one side

    A difference question needs both POP and OOP points.

    Wrong working

    POP is top-down.

    Right working

    POP is top-down whereas OOP is bottom-up.

    Do this: Always write both sides in the same sentence.

    Usually costs: 1 mark

Exam tips

  • Define each principle in one sentence and add one real-life example; the syllabus asks for exactly this.
  • For a difference question, use a table with one pair of points per mark.
  • Do not use a computer example for real life; use things like an ATM, a remote or a family.
  • In Java, the form of polymorphism you are expected to know at Class X is method overloading.

Practice questions on Four Principles of OOP

Write each answer on paper first. Open the hint only if you are stuck, and the answer only when you have finished.

  1. Q1 · 1 mark · MCQBoard level

    Which OOP principle is used when the + operator adds two numbers and also joins two strings?
    (a) Inheritance (b) Encapsulation (c) Polymorphism (d) Abstraction

    Hint

    One symbol, many behaviours.

    Answer

    (c) Polymorphism

  2. Q2 · 1 mark · Very short answerBoard level

    Define encapsulation.

    Hint

    Wrapping plus protection.

    Answer

    Encapsulation is the wrapping of data and the methods that operate on it into a single unit (a class), with the data protected from direct outside access.

  3. Q3 · 2 marks · Short answerBoard level

    Explain data abstraction with a real-life example other than a vehicle or a vending machine.

    Hint

    What does the user see and not see?

    Answer

    Data abstraction means showing only the essential features and hiding the background details. Example: a television remote shows buttons for volume and channel; the user does not know the circuits that carry out the commands.

  4. Q4 · 3 marks · Short answerHarder board level

    Rohan says: "Making variables private is abstraction." Is this the better description of abstraction or of encapsulation? Justify with two points and an example.

    Hint

    Outside view vs inside packing.

    Answer

    It is encapsulation. Private variables restrict direct access to the data and keep data with its methods in one class; example: a private balance changed only through deposit(). Abstraction is about showing only the essential view, for example calling deposit() without seeing its code.

  5. Q5 · 1 mark · Assertion-reasonHOTS / competency

    Assertion (A): Inheritance reduces repeated code in a program.
    Reason (R): A sub class can use the non-private members of its super class without rewriting them.
    (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.

    Hint

    Does R say why the code is saved?

    Answer

    (a) Both are true and R explains A: because the sub class reuses the inherited members, the same code need not be written again.

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. 1.Name the four principles of OOP.Show answer

    Data abstraction, encapsulation, inheritance and polymorphism.

  2. 2.What is the other name for a super class?Show answer

    Base class.

  3. 3.What is the other name for a sub class?Show answer

    Derived class.

  4. 4.Which principle gives code reusability?Show answer

    Inheritance.

  5. 5.Give one example of a procedure oriented language.Show answer

    C (or Pascal).

  6. 6.Which principle is also called data hiding?Show answer

    Encapsulation (the data hiding part of it).

Four Principles of OOP: frequently asked questions

What is the difference between POP and OOP?

POP is built around functions and is top-down, with data shared among functions. OOP is built around objects that contain data and methods, is bottom-up and keeps data protected.

Is Java a purely procedure oriented language?

No. Java is an object oriented language: every program is written inside a class.

How many principles of OOP does the ICSE syllabus ask for?

Four: data abstraction, inheritance, polymorphism and encapsulation, each to be defined and explained with real-life examples.