Questions · Page 1 of 8

MCQ

🎯

Test yourself on this topic

50 questions · timed · auto-graded

MCQ 11 Mark
Which type of features are implemented in subclass in inheritance?
  • A
    Common
  • Special
  • C
    a and b both
  • D
    None of these
Answer
Correct option: B.
Special
Special
View full question & answer
MCQ 21 Mark
Which type of features are implemented in superclass in inheritance?
  • Common
  • B
    Special
  • C
    a and b both
  • D
    None of these
Answer
Correct option: A.
Common
Common
View full question & answer
MCQ 31 Mark
Which of the following represents exclusive relationship between two classes?
  • A
    Aggregation
  • Composition
  • C
    Encapsulation
  • D
    Polymorphism
Answer
Correct option: B.
Composition
Composition
View full question & answer
MCQ 41 Mark
Which of the following represents non-exclusive relationship between two classes?
  • Aggregation
  • B
    Composition
  • C
    Encapsulation
  • D
    Polymorphism
Answer
Correct option: A.
Aggregation
Aggregation
View full question & answer
MCQ 51 Mark
What is a relationship called when there is ‘has- a’ or ‘a-part-of’ relationship between two classes?
  • A
    Aggregation
  • B
    Composition
  • a or b
  • D
    Polymorphism
Answer
Correct option: C.
a or b
a or b
View full question & answer
MCQ 61 Mark
For which of the following values of attribute more than one class may be associated with each other?
  • A
    Class
  • Object
  • C
    Data
  • D
    Field
Answer
Correct option: B.
Object
Object
View full question & answer
MCQ 71 Mark
Which of the following are distinguished by their state?
  • A
    Class
  • Object
  • C
    Data
  • D
    Field
Answer
Correct option: B.
Object
Object
View full question & answer
MCQ 81 Mark
Which of the following together can a class encapsulate as a template that can be shared by all objects?
  • A
    Attribute
  • B
    Method
  • a and b both
  • D
    None of these
Answer
Correct option: C.
a and b both
a and b both
View full question & answer
MCQ 91 Mark
Which of the following encapsulates attributes (data) and methods (behavior or functionality) together as a template that can be shared by all objects?
  • Class
  • B
    Inheritance
  • C
    Super object
  • D
    Sub object
Answer
Correct option: A.
Class
Class
View full question & answer
MCQ 101 Mark
On which of the following two does focus lie in object-oriented programming?
  • A
    Data and Animation
  • B
    Networking and Animation
  • Data and functionality
  • D
    Animation and Functionality
Answer
Correct option: C.
Data and functionality
Data and functionality
View full question & answer
MCQ 111 Mark
In which of the following does object-oriented methodology play significant role?
  • A
    Analysis of software system
  • B
    Design
  • C
    Implementation
  • All of these
Answer
Correct option: D.
All of these
All of these
View full question & answer
MCQ 121 Mark
What is represented using class-diagram?
  • A
    Relationship
  • B
    Constraints
  • a and b both
  • D
    None of these.
Answer
Correct option: C.
a and b both
a and b both
View full question & answer
MCQ 131 Mark
By which of the following is class made in composition?
  • By other class
  • B
    Inherited
  • C
    or
  • D
    None of these
Answer
Correct option: A.
By other class
By other class
View full question & answer
MCQ 141 Mark
In which of the following classes do not inherit from other classes, but are composed of other classes?
  • A
    Inheritance
  • B
    Aggregation
  • C
    Polymorphism
  • All of these
Answer
Correct option: D.
All of these
All of these
View full question & answer
MCQ 151 Mark
‘Which of the following statements is true for inheritance?
  • A
    Allows to share functionality of class
  • B
    Allows to reuse functionality of class
  • C
    Extend functionality
  • All of these
Answer
Correct option: D.
All of these
All of these
View full question & answer
MCQ 161 Mark
Which type of relationship exists between superclass and subclass in inheritance?
  • ‘a kind of’
  • B
    ‘multi kind of’
  • C
    None of these
  • D
    ‘different kind of’
Answer
Correct option: A.
‘a kind of’
‘a kind of’
View full question & answer
MCQ 171 Mark
In which classes does ‘a-kind-of’ relationship exist in inheritance?
  • A
    Masterclass and Superclass
  • B
    Masterclass and Subclass
  • Superclass and Subclass
  • D
    Subclass and Subclass
Answer
Correct option: C.
Superclass and Subclass
Superclass and Subclass
View full question & answer
MCQ 181 Mark
Which of the following is an example of multilevel inheritance?
  • A
    Person - Employee -Teacher
  • B
    Computer - Mother board -Model
  • a and b both
  • D
    None of these
Answer
Correct option: C.
a and b both
a and b both
View full question & answer
MCQ 191 Mark
When one class is derived from second class and second class is derived from third class; State what it is known as.
  • Inner inheritance
  • B
    Multilevel inheritance
  • C
    Level inheritance
  • D
    Nested inheritance
Answer
Correct option: A.
Inner inheritance
Inner inheritance
View full question & answer
MCQ 201 Mark
Which of the following class is a specialized version with additional attributes and methods?
  • A
    Super
  • B
    Base
  • a and b both
  • D
    Sub
Answer
Correct option: C.
a and b both
a and b both
View full question & answer
MCQ 211 Mark
In which of the following class are common attributes and methods defined?
  • A
    Sub
  • B
    Child
  • C
    a and b both
  • Super
Answer
Correct option: D.
Super
Super
View full question & answer
MCQ 221 Mark
Which relationship refers between two classes where one class is a specialized version of another class?
  • A
    Polymorphism
  • Inheritance
  • C
    Abstraction
  • D
    Encapsulation
Answer
Correct option: B.
Inheritance
Inheritance
View full question & answer
MCQ 231 Mark
‘Which of the following is a class-diagram if teacher class is created in Person class?
  • Person ‘1— Teacher
  • B
    Person —f Teacher
  • C
    Person Teacher
  • D
    Person Teacher
Answer
Correct option: A.
Person ‘1— Teacher
Person ‘1— Teacher
View full question & answer
MCQ 241 Mark
By using arrow pointing to which class in class- diagram is inheritance represented?
  • super
  • B
    Sub
  • C
    Child
  • D
    Derived
Answer
Correct option: A.
super
super
View full question & answer
MCQ 251 Mark
By using which type of pointing to superclass in class-diagram is inheritance represented?
  • A
    Line
  • B
    Arrow
  • An empty diamond
  • D
    A filled diamond
Answer
Correct option: C.
An empty diamond
An empty diamond
View full question & answer
MCQ 261 Mark
“Inheritance allows the methods to be redefined in subclass as per need.” Specify this statement.
  • This statement is true.
  • B
    This statement is false.
  • C
    It depends on object.
  • D
    It depends on class
Answer
Correct option: A.
This statement is true.
This statement is true.
View full question & answer
MCQ 271 Mark
What can be done in sub class?
  • A
    New data can be adde
  • B
    New members can be added.
  • a and b both
  • D
    None of these
Answer
Correct option: C.
a and b both
a and b both
View full question & answer
MCQ 281 Mark
Which feature provides reusability where existing methods can be reused without redefining?
  • Aggregation
  • B
    Inheritance
  • C
    Composition
  • D
    Encapsulation
Answer
Correct option: A.
Aggregation
Aggregation
View full question & answer
MCQ 291 Mark
Choose the data attributes and methods of the class that are available to objects in the subclass without rewriting their declaration.
  • Supe
  • B
    Sub
  • C
    Child
  • D
    Derived
Answer
Correct option: A.
Supe
Supe
View full question & answer
MCQ 301 Mark
What is called an existing class in object-oriented terminology?
  • A
    Super class
  • B
    Parent class
  • C
    Base class
  • All of these
Answer
Correct option: D.
All of these
All of these
View full question & answer
MCQ 311 Mark
What is called a new class in object-oriented terminology?
  • A
    Subclass
  • B
    Child class
  • C
    Derived class
  • All of these
Answer
Correct option: D.
All of these
All of these
View full question & answer
MCQ 321 Mark
Which relationship is appropriate when one class is a kind of other class?
  • ‘is - a - kind - of’
  • B
    ‘multi - kind - of’
  • C
    ‘multilevel - kind - of’
  • D
    None of these
Answer
Correct option: A.
‘is - a - kind - of’
‘is - a - kind - of’
View full question & answer
MCQ 331 Mark
Which of the following refers to the capability of defining a new class of objects that inherits the characteristics of another existing class?
  • A
    Aggregation
  • Inheritance
  • C
    Composition
  • D
    Encapsulation
Answer
Correct option: B.
Inheritance
Inheritance
View full question & answer
MCQ 341 Mark
Which of the following is referred to as ‘is-a- kind-of’ relationship between two classes?
  • A
    Aggregation
  • Inheritance
  • C
    Composition
  • D
    Encapsulation
Answer
Correct option: B.
Inheritance
Inheritance
View full question & answer
MCQ 351 Mark
Which class is an example of aggregated class when Person class has Name and Address class?
  • A
    Person
  • B
    Address
  • C
    Name
  • b & c both
Answer
Correct option: D.
b & c both
b & c both
View full question & answer
MCQ 361 Mark
Which class is an example of aggregating class when Person class has Name and Address class?
  • Person
  • B
    Address
  • C
    Name
  • D
    All of these
Answer
Correct option: A.
Person
Person
View full question & answer
MCQ 371 Mark
What is known as the class when it is contained in owner class?
  • A
    Subject Class
  • B
    Part Class
  • C
    Aggregated Class
  • All of these
Answer
Correct option: D.
All of these
All of these
View full question & answer
MCQ 381 Mark
What is known as the class when it contains object of other class?
  • A
    Owner Class
  • B
    Whole Class
  • C
    Aggregating Class
  • All of these
Answer
Correct option: D.
All of these
All of these
View full question & answer
MCQ 391 Mark
With which symbol is aggregation represented in class-diagram?
  • Symbol of an empty diamond
  • B
    Symbol of a filled diamond
  • C
    Symbol of an empty triangle
  • D
    Symbol of a filled diamond
Answer
Correct option: A.
Symbol of an empty diamond
Symbol of an empty diamond
View full question & answer
MCQ 401 Mark
How much is the object class affected when an object of aggregation class is deleted in composition?
  • A
    It will not be delete
  • It will be deleted.
  • C
    It depends on object.
  • D
    It depends on class.
Answer
Correct option: B.
It will be deleted.
It will be deleted.
View full question & answer
MCQ 411 Mark
Which of the following is a strong type of aggregation where the lifetime of the part class depends on the existence of the owner class?
  • A
    Aggregation
  • B
    Polymorphism
  • C
    Encapsulation
  • Composition
Answer
Correct option: D.
Composition
Composition
View full question & answer
MCQ 421 Mark
Which of the following represents exclusive relationship between two classes?
  • A
    Aggregation
  • B
    Polymorphism
  • C
    Encapsulation
  • Composition
Answer
Correct option: D.
Composition
Composition
View full question & answer
MCQ 431 Mark
In which of the following is the life of an object of the part class not determined by the owner class?
  • Aggregation
  • B
    Polymorphism
  • C
    Encapsulation
  • D
    Abstraction
Answer
Correct option: A.
Aggregation
Aggregation
View full question & answer
MCQ 441 Mark
In which of the following can the class that forms part of the owner class exist independently?
  • Aggregation
  • B
    Polymorphism
  • C
    Encapsulation
  • D
    Abstraction
Answer
Correct option: A.
Aggregation
Aggregation
View full question & answer
MCQ 451 Mark
Which of the following represents non-exclusive relationship between two classes?
  • Aggregation
  • B
    Polymorphism
  • C
    Encapsulation
  • D
    Abstraction
Answer
Correct option: A.
Aggregation
Aggregation
View full question & answer
MCQ 461 Mark
Which attributes will a class contain when we define a class ‘computer’?
  • A
    Motherboard
  • B
    Screen
  • a and b both
  • D
    None of these
Answer
Correct option: C.
a and b both
a and b both
View full question & answer
MCQ 471 Mark
A computer screen is a class with following attribute?
  • A
    length
  • B
    width
  • C
    model
  • All of these
Answer
Correct option: D.
All of these
All of these
View full question & answer
MCQ 481 Mark
Which relationship does aggregation or composition represent between different classes?
  • A
    has-a
  • B
    a-part-of
  • a or b
  • D
    None of these
Answer
Correct option: C.
a or b
a or b
View full question & answer
MCQ 491 Mark
What is called when objects of one class are composed of other class?
  • A
    Aggregation
  • B
    Composition
  • a or b
  • D
    Overloading
Answer
Correct option: C.
a or b
a or b
View full question & answer
MCQ 501 Mark
What is called the capability of using same names to mean different things in different context in general?
  • Overloading
  • B
    Aggregation
  • C
    Composition
  • D
    Encapsulation
Answer
Correct option: A.
Overloading
Overloading
View full question & answer