KnowledgeBoat Logo
|
LoginJOIN NOW

Computer Applications

How do objects interact with one another? Give an example.

Objects & Classes

11 Likes

Answer

When the objects need to interact with one another, they pass/request information to/from one-another. This interaction is known as message passing. Objects interact with one another through messages.

For instance, to represent a school's working, we can represent its various units — admission desk, fee department, enquiry desk, academic department, activities department, transport department etc.

Now, let us consider a new student who wants admission in the school. Here, the admission desk will get the details of the student and direct him to fee department to deposit the fee, which will require the admission desk and fee department to communicate regarding the amount of fee to be paid by the student. This communication takes place through message passing.

Answered By

6 Likes


Related Questions