0% found this document useful (0 votes)
375 views

Oops Quiz With Answers

This document contains a quiz with questions about object-oriented programming concepts like classes, objects, attributes, encapsulation, inheritance, polymorphism, and C++ programming. There are 5 sections with questions ranging from basic concepts to more advanced topics like system design using object-oriented modeling and features of the C++ language. The questions cover key topics relevant to learning object-oriented programming and C++.

Uploaded by

Abcd Efgh
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
375 views

Oops Quiz With Answers

This document contains a quiz with questions about object-oriented programming concepts like classes, objects, attributes, encapsulation, inheritance, polymorphism, and C++ programming. There are 5 sections with questions ranging from basic concepts to more advanced topics like system design using object-oriented modeling and features of the C++ language. The questions cover key topics relevant to learning object-oriented programming and C++.

Uploaded by

Abcd Efgh
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 9

Q No.

QUESTIONS MARKS CO

SECTION-A

1 An/A ————– is a data value held by objects in a class. 1 CO1

a) Data
b) Functions
c) Attributes
d) None of the above

2 Abstraction has ______ types. 1 CO1


a) 1
b) 2
c) 3
d) 4

3 Which of the following is/are the characteristic/s of an object? 1 CO1

a) Unique identification
b) Set of attributes
c) Set of states
d) Set of operations (behavior)
e) All of the above
4 A class describes ——- 1 CO1

a) a collection of similar objects


b) a template where basic characteristics of a set of objects are
defined c) the basic attributes and the operations of the objects of
that type d) All of the above

5 In OMT, the link is represented by a 1 CO1

a) Line
b) The line labeled with its name
c) Arrow labeled with its name
d) None

6 To hide the internal implementation of an object we use … 1 CO1


a) inheritance
b) encapsulation
c) polymorphism
d) none of these

7 A link is a physical or conceptual connection between 1 CO1

a) object instances
b) Classes
c) Objects
d) None

8 In which principle, the models created explain the identification 1 CO1


of a problem and find its solution?
a. The Choice of Model is Important
b. Levels of Precision May Differ
c. The Best Models are connected to Reality
d. No Single Model is Sufficient

9 ________ helps to communicate the overall system 1 CO1


architecture unambiguously.
a. Flow charts
b. Designing
c. SRS
d. Templates
10 1 CO1
________ can be done for both simple and complex
systems. a. Generalization n
b. Specification cm,
c. Modeling
d. Collaboration

SECTION-B

11 Which of the following is a name that uniquely identifies one end 1 CO2
of an association?

a) Label name of the link


b) Role name
c) Link attribute name
d) None

12 Combination of single, multiple, hierarchical, and 1 CO2


multilevel inheritance forms

a) Hierarchical Inheritance
b) Hybrid inheritance
c) Containership
d) None
13 A set of ________ models are used to approach a 1 CO2 1 CO2
complex system. a. Dependent w"
b. Independent
c. Both dependent and independent
d. Different

14 A collection of operations that specify the services

rendered by a class or component known as________

a. Class
b. Interaction
c. Interface
d. Collaboration

15 ________ is an abstraction of a set of functions that the 1 CO2


system performs. a. Class
b. Interaction
c. Use case
d. Collaboration

16 The explanatory parts of the UML model are known as 1 CO2


________ a. Behavioral things
b. Grouping things
c. Structural things
d. Annotational things

17 ______ are used to create new building blocks from 1 CO2


existing blocks. a. Tagged Values
b. Stereotypes
c. Constraints
d. Diagrams
18 1 CO2
All public methods in business model objects are defined directly
or indirectly because of a ________ requirement.
a. Use case
b. Dependency
c. Association
d. Sequence

18 The system icon identifies ________ 1 CO2


a. The boundaries of the system
b. The scope of the project so
c. The context of the system
d. Another system in the role of an actor
20 A person may function in ________ 1 CO2
a. Only one role le
b. Many roles
c. One role per system
d. One role per use case

SECTION-C

21 The Object Oriented Modeling for building systems takes the ———– 1 CO3
as the basis.

a) Class b) Object c) Model d) Modules

22 The basic step/s of system b) System Design


designing using Object-Oriented c) Object Design d) Implementation
Modelling is/are —— e) All of the above 1 CO3

a) System Analysis

23 In which of the following phase, the class objects and the 1 CO3
interrelationships of these classes are translated and actually coded
by using an object-oriented programming language?

a) Analysis
b) Design
c) Development
d) Testing

24 In which of the following phase required databases are created 1 CO3


and the complete system is transformed into an operational one?

a) Analysis
b) Design
c) Implementation
d) None
25 The OMT consists of three related but different viewpoints 1 CO3
each capturing important aspects of the system

a) The static, dynamic, and functional behaviors of the


system b) Analysis, Design, Coding
c) Real-life environment, objects, and behavior of a
26 system d) None 1 CO3
The object model describes the ————- of a system.

a) static
b) structural
c) data aspects
d) Static, structural, and data aspects

27 The dynamic model describes the —————– aspect of a system 1 CO3

a) temporal
b) behavioral
c) control
d) Temporal, behavioral, and control

28 The functional model describes the —————- aspects of a system. 1 CO3

a) Behavioral
b) transformational
c) functional
d) All of the above

29 An association maybe —— 1 CO3

a) unary
b) binary
c) ternary or n-ary
d) All of the above

30 The attribute(s) is/are associated with the association is called 1 CO3

a) Link attribute
b) Derived attribute
c) Multi-valued attribute
d) None

SECTION-D

31 Which of the following is the correct syntax to add the header file in 1 CO4
the C++ program?

a) #include<userdefined>
b) #include "userdefined.h"
c) <include> "userdefined.h"
d) Both A and B
32 Which of the following is the address operator? 1 CO4

a) @
b) #
c) &
d) %
33 Which of the following features must be supported by any 1 CO4
programming language to become a pure object-oriented
programming language?

a) Encapsulation
b) Inheritance
c) Polymorphism
34 1 CO4
d) All of the above
The programming language that has the ability to create new data types
is called___.

a) Overloaded
b) Encapsulated
c) Reprehensible
35 d) Extensible 1 CO4
Which of the following is the original creator of the C++ language?

a) Dennis Ritchie
b) Ken Thompson
c) Bjarne Stroustrup
d) Brian Kernighan

36 Which of the following is the correct syntax to read the single character 1 CO4
to console in the C++ language?

a) Read ch()
b) Getline vh()
c) get(ch)
d) Scanf(ch)

37 Which of the following statements is correct about the formal parameters 1 CO4
in C++?

a) Parameters with which functions are called


b) Parameters which are used in the definition of the
function c) Variables other than passed parameters in a
function
d) Variables that are never used in the function

38 Which of the following features is required to be supported by the


1 CO4
programming language to become a pure object-oriented programming
language?
a) Encapsulation
b) Inheritance
c) Polymorphism
d) All of the above

39 Which of the following comment syntax is correct to create a 1 CO4


single-line comment in the C++ program?

a) //Comment
b) /Comment/
c) Comment//
d) None of the above

40 C++ is a ___ type of language.


1 CO4

a) High-level Language
b) Low-level language
c) Middle-level language
d) None of the above
SECTION-E

41 For inserting a new line in C++ program, which one of the following
1 CO5
statements can be used?

a) \n
b) \r
c) \a
d) None of the above

42 Which of the following refers to characteristics of an array? 1 CO5

a) An array is a set of similar data items


b) An array is a set of distinct data items
c) An array can hold different types of datatypes
d) None of the above

43 If we stored five elements or data items in an array, what will be the 1 CO5
index address or the index number of the array's last data item?

a) 3
b) 5
c) 4
d) 88
44 Which of the following is the correct syntax for printing the address of 1 CO5
the first element?

a) array[0];
b) array[1];
c) array[2];
d) None of the above

45 Which of the following gives the 4th element of c) Array[3];


the array?
d) None of the above
1 CO5
a) Array[0];
b) Array[0];

46 Which type of memory is used by an Array in C++ programming language? 1 CO5

a) Contiguous
b) None-contiguous
c) Both A and B
d) Not mentioned

47 How many types of the array are there in the C++ programming language? 1 CO5

a) In the C++ programming language, there are three types of


arrays b) In the C++ programming language, there are four
types of arrays c) In the C++ programming language, there
are two types of arrays d) Both A and B

48 In C++, for what purpose the "rank()" is used? 1 CO5

a) It returns the size of each dimension


b) It returns the maximum number of elements that can be stored in
the array
c) It returns the dimension of the specified array
d) None of the above
49 Which one of the following is the correct definition of the 1 CO5
"is_array();" function in C++?

a) It checks that the specified variable is of the array or


not b) It checks that the specified array of single dimension
or not c) It checks that the array specified of
multi-dimension or not d) Both B and C

50 What did we call an array of the one-dimensional array? 1 CO5

a) Single Dimensional array


b) Multi-Dimensional array
c) 2D Array (or 2-Dimensional array)
d) Both A and B

You might also like