Computer Applications
What is an object ? Give examples of some real world objects.
Objects & Classes
14 Likes
Answer
An object is an entity having a specific identity, specific characteristics and specific behaviour.
Examples:
- A car is an object.
Characteristics — It has colour, length, width, height, model, a steering wheel, gear box etc.
Behaviour — Accelerating, changing gears, braking, etc. - A book is an object.
Characteristics — It has a name, ISBN number, author, publisher, price, etc.
Behaviour — Book can be read, opened/closed, borrowed/returned, etc. - A student is an object.
Characteristics — It has a name, age, address, class, section, subjects etc.
Behaviour — He/she can study, play, sleep.
Answered By
7 Likes
Related Questions
Fill in the blanks:
There can be multiple classes representing different _________ of an object.
Fill in the blanks:
_________ are created once for entire class and are shared by all the objects. [(a) static or class variables (b) Instance variables (c) shared variable (d) none of the above]
'An object's state and behaviour are two distinct things yet linked to one another'. Comment.
Define data abstraction.