- 2069 Poush · 8 marks
Object oriented system and core concepts
Short answer
An object-oriented system is a collection of interacting objects that combine data and behavior. Classes serve as blueprints; objects are instances. Encapsulation hides data, abstraction exposes only essential features. Objects communicate via messages. Inheritance creates "is-a" hierarchies, interfaces define operation signatures, and polymorphism lets a message behave differently per object.
Explain object oriented system with reference to class, object, encapsulation, abstraction, message, inheritance, interface and polymorphism with suitable examples.
An object-oriented system is a system built as a collection of interacting objects. Each object has data and behaviour, and objects cooperate by sending messages to each other, instead of one program calling functions on shared data.
Class
A class is a blueprint or template that defines the attributes and operations common to a set of objects. Example: Student with attributes name, roll and operations register(), getResult().
Object
An instance of a class with its own identity, state and behaviour. Example: s1 = Student("Ram", 101).
Encapsulation
Binding data and methods together and hiding the internal data using access control (private). Example: balance of an account is private and changed only by deposit()/withdraw().
Abstraction
Showing only essential features and hiding the details. Example: a Car user uses start() and accelerate() without knowing the engine internals.
Message
A request sent to an object to invoke one of its operations. Example: account.withdraw(500) sends the message withdraw with argument 500 to the object account.
Inheritance
A subclass acquires attributes and methods of a superclass, giving reuse and an "is-a" hierarchy. Example: Student and Teacher inherit name and address from Person.
Interface
A named set of operation signatures without implementation, which a class promises to provide. Example: interface Printable { print(); } is implemented by Report and Invoice.
Polymorphism
The same message gives different behaviour depending on the object receiving it. Example: shape.draw() draws a circle for Circle and a rectangle for Rectangle.
+---------+
| Person |
+---------+
^ ^
| |
+---------+ +---------+
| Student | | Teacher |
+---------+ +---------+
s1:Student --- message: getResult() ---> object
Together these concepts make the system modular, reusable, easy to change and close to the real-world problem.
✓ Answer checked by Claude Opus 5.5 (high effort)
Related questions
- Encapsulation and abstraction working together · Object Oriented Analysis and Design, chapter 1
- Algorithmic vs object-oriented decomposition · Object Oriented Analysis and Design, chapter 1
- Event management system summary and class diagram · Object Oriented Analysis and Design, chapter 2
- Interface vs implementation · Object Oriented Analysis and Design, chapter 4 · asked 2×
- Video rental shop class diagram · Object Oriented Analysis and Design, chapter 2
- Point of sale class diagram · Object Oriented Analysis and Design, chapter 2
- Data abstraction versus encapsulation · Object Oriented Programming, chapter 1
- Friend class and encapsulation · Object Oriented Programming, chapter 4
- Compare procedural and object oriented programming · Object Oriented Programming, chapter 1
- OS abstraction, extended machine, system call · Operating System, chapter 1
All Object Oriented Analysis and Design chapter 1 questions →