Computer Science, asked by saiharshitham7430, 10 months ago

In a class,encapsulating an object of another class is called

Answers

Answered by riyaagg315
5

Answer:

inner class and capsule eating an object of another class is called composition

Answered by GulabLachman
0

Encapsulation of an object of another class is called composition.

  • Composition is the proper usage of an item ideally from one class by another.
  • It is one of the fundamental concepts in the subject of object-oriented programming
  • It is important for the class function to indicate how the constructors are called for their data members in composition scenarios.
  • It is typically employed when a new class needs to have the characteristics of an existing class but not its interface.
  • The user of the new class sees the interface that is specified already rather than the interface from the old class.
  • Thus, the user embeds an object to implement various features of their new class.

#SPJ2

Similar questions