---
title: "Characteristics and advantages of OOP"
subject: "Software Engineering"
chapter: 2
key: "semester_5/software_engineering:oop-characteristics"
source: https://www.bctengineer.com/q/semester_5/software_engineering/oop-characteristics
site: BCT Engineering
---

# Characteristics and advantages of OOP

Software Engineering · Chapter 2: System model

- Asked in: 2067 Ashadh (old course), 10 marks
- Video: [Object-Oriented Programming, Simplified](https://www.youtube.com/watch?v=pTB0EiLXUC8) — Programming with Mosh
- Answer checked by Claude Sonnet 5.5 on 2026-10-14
- Page: https://www.bctengineer.com/q/semester_5/software_engineering/oop-characteristics
- Whole chapter: https://www.bctengineer.com/md/semester_5/software_engineering/chapter-2

## Question

What are the characteristics of Object Oriented Programming? What are the main advantage of OOP?

## Short answer

OOP characteristics: objects, classes, encapsulation, abstraction, inheritance, polymorphism, dynamic binding, message passing. Main advantages: reusability, modularity, easy maintenance.

## Answer

**Object-Oriented Programming (OOP)** is a programming approach in which a program is organised as a set of **objects** that combine data (attributes) and the operations (methods) on that data, and that work together by sending messages to each other. Languages such as C++, Java, Python and C# support OOP.

#### Characteristics of OOP

1. **Objects** – an object is a run-time entity that has a state (attribute values), behaviour (methods) and a unique identity. Example: a particular bank account with number 1001 and balance Rs. 5000.

2. **Classes** – a class is a template or blueprint from which objects are created. It defines the attributes and methods that all its objects share. Example: class `Account`.

3. **Encapsulation** – data and the methods that act on it are bundled together in a class, and the internal data is hidden (`private`). Other objects can access it only through public methods. This is also called **information hiding**.

4. **Abstraction** – only the essential features are shown to the user and the implementation details are hidden. A user calls `withdraw()` without knowing how the balance is stored.

5. **Inheritance** – a new class (subclass) can be derived from an existing class (superclass) and reuse its attributes and methods, adding or overriding some of them. It forms an "is-a" hierarchy. Example: `SavingsAccount` is an `Account`.

6. **Polymorphism** – one name can have many forms. The same message can produce different behaviour depending on the object that receives it.
   - Compile-time: function and operator overloading.
   - Run-time: method overriding through virtual functions.

7. **Dynamic binding** – the method to be executed for a call is decided at run time, based on the actual type of the object. This makes run-time polymorphism possible.

8. **Message passing** – objects communicate by calling each other's methods (sending messages), e.g. `acc.deposit(500)`.

```text
          +----------------------+
          |       Account        |
          |----------------------|
          | - accNo              |
          | - balance            |
          |----------------------|
          | + deposit(amt)       |
          | + withdraw(amt)      |
          | + calcInterest()     |
          +----------------------+
                    ^
          +---------+----------+
          |                    |
+------------------+  +------------------+
| SavingsAccount   |  | CurrentAccount   |
|------------------|  |------------------|
| + calcInterest() |  | + calcInterest() |
+------------------+  +------------------+
```

Small Java example:

```java
class Account {
    private double balance;            // encapsulation
    public void deposit(double a) { balance += a; }
    public double calcInterest() { return 0; }
}
class SavingsAccount extends Account { // inheritance
    public double calcInterest() {     // polymorphism
        return 0.05 * 1000;
    }
}
Account a = new SavingsAccount();      // dynamic binding
a.calcInterest();                      // calls SavingsAccount version
```

#### Advantages of OOP

1. **Reusability** – classes, once written and tested, can be reused in other programs, and inheritance lets new classes reuse existing code.
2. **Modularity** – each class is a self-contained unit, so a large program is split into manageable parts that can be developed and tested separately.
3. **Easy maintenance** – because data is encapsulated, a change inside a class does not affect the rest of the program as long as its interface stays the same.
4. **Data security** – information hiding prevents other parts of the program from changing data accidentally.
5. **Extensibility** – new features are added by creating new subclasses without changing existing, tested code (open-closed principle).
6. **Real-world modelling** – objects map naturally to real things (student, book, account), so the design is easier to understand and to discuss with users.
7. **Smooth transition from analysis to code** – the same object concepts are used in object-oriented analysis (OOA), design (OOD) and programming, so models map directly to code.
8. **Parallel development and scalability** – different teams can work on different classes, which suits large, complex systems.
9. **Flexibility through polymorphism** – code written for a superclass works for any subclass, reducing `if-else`/`switch` code.

Main drawbacks, for balance: programs can be larger and slightly slower, and good class design needs experience.

## Check yourself

The answer's key points as multiple-choice questions, with the correct option and why.

1. What is the relationship between a class and an object?
   A. A class is a run-time instance; an object is the blueprint
   B. A class is a template; an object is a run-time entity created from it
   C. They are the same thing
   D. A class is a method; an object is an attribute
   Answer: B. A class is a blueprint defining attributes and methods; objects are run-time entities created from it. (Key point: Class vs object)

2. What does encapsulation (information hiding) mean?
   A. A subclass reuses the code of a superclass
   B. Data and methods are bundled in a class with internal data private, accessed through public methods
   C. One name has many forms
   D. Objects are created at run time
   Answer: B. Encapsulation bundles data with its methods and hides the data so it is reached only through public methods. (Key point: Encapsulation)

3. Which mechanism gives run-time polymorphism?
   A. Function overloading
   B. Operator overloading
   C. Method overriding with dynamic binding
   D. Declaring attributes private
   Answer: C. Overloading is compile-time polymorphism; overriding through virtual functions and dynamic binding decides the method at run time. (Key point: Run-time polymorphism)

4. Which statement about inheritance is correct?
   A. A subclass can reuse and override the superclass's features, forming an is-a hierarchy
   B. A subclass cannot change inherited methods
   C. Inheritance hides data from the user
   D. Inheritance means objects exchange messages
   Answer: A. A subclass such as SavingsAccount is an Account, reusing and possibly overriding its attributes and methods. (Key point: Inheritance)

5. Why does OOP make maintenance easier?
   A. Programs are always faster
   B. A change inside a class does not affect the rest of the program if its interface stays the same
   C. No testing is needed
   D. All data is global
   Answer: B. Encapsulation lets internals change without breaking other code, provided the public interface is unchanged. (Key point: Advantage: maintenance and security)

## Related in other subjects

- [Compare procedural and object oriented programming](https://www.bctengineer.com/question.md?key=semester_3%2Fobject_oriented_programming%3Aprocedural-vs-oop-compare) — Object Oriented Programming, chapter 1
- [Advantages of OOP over procedural programming](https://www.bctengineer.com/question.md?key=semester_3%2Fobject_oriented_programming%3Aoop-vs-procedural-advantages) — Object Oriented Programming, chapter 1, asked 5×
- [Features and characteristics of OOP](https://www.bctengineer.com/question.md?key=semester_3%2Fobject_oriented_programming%3Aoop-features) — Object Oriented Programming, chapter 1, asked 7×
- [Object oriented system and core concepts](https://www.bctengineer.com/question.md?key=semester_6%2Fobject_oriented_analysis_and_design%3Aoo-system-concepts-explained) — Object Oriented Analysis and Design, chapter 1
