composition and inheritance

MCQsQuestion.com has 4 Question/Answers about Topic composition and inheritance

Classes refers to use of one or more classes within definition of another class, is called

Classes refers to use of one or more classes within definition of another class, is called
  • A. Inheritance
  • B. Composition
  • C. Provision
  • D. None of them
  • Correct Answer: Option B

When a data member of new class is an object of another class, it is called as

When a data member of new class is an object of another class, it is called as
  • A. New class is a composite of other objects
  • B. New class is inherited
  • C. New class is aggregate of another
  • D. None of them
  • Correct Answer: Option A

A way to reuse existing classes to create new classes, is called

A way to reuse existing classes to create new classes, is called
  • A. Composition
  • B. Inheritance
  • C. Containment
  • D. All of them
  • Correct Answer: Option B

Specialization and derivation is another name of

Specialization and derivation is another name of
  • A. Inheritance
  • B. Composition
  • C. Provision
  • D. Containment
  • Correct Answer: Option A