KnowledgeBoat Logo

Computer Applications

Define objects. Give a real life example to explain objects along with their attributes and behaviour.

Java Intro

ICSE

58 Likes

Answer

An object represents data (attributes) and its related methods (behaviour) as a single unit. Take the example of a car. When we describe a car as an object, there are a number of physical factors which contribute to define its state such as its brand name, colour, speed, size, number of seats, etc. In addition, the car has several functional definitions. It transports people to different locations by controlling its speed and direction, an accelerator to increase or decrease its speed and brakes to stop it. Thus we can say that car is an object that combines its attributes and behaviour as a single unit.

Answered By

31 Likes


Related Questions