OOP and Design Patterns Quiz
OOP and Design Patterns Quiz
Draft saved
* Required
model is called *
Algorithm
Data Structure
Classes
Objects
Data Abstraction
https://docs.google.com/forms/d/e/1FAIpQLSdk_kKDeznboWR8suYC0VsjZ4ndOM8cZQyJfhTfvLUKRh2vnw/viewform 1/5
10/18/21, 11:42 AM Test 6: Unit1 and Unit 2
None
Class
Object
Interfaces
Which rule of Substitute Principle ensures that 'if a program is type-correct 1 point
None
1 point
Queue
1 point
Option 1
https://docs.google.com/forms/d/e/1FAIpQLSdk_kKDeznboWR8suYC0VsjZ4ndOM8cZQyJfhTfvLUKRh2vnw/viewform 2/5
10/18/21, 11:42 AM Test 6: Unit1 and Unit 2
Abstraction
Inheritance
Encapsulation
Polymorphism
1 point
Option 1
1 point
Option 1
Efficient Code
Duplicate/Redundant data
Modularity
Code reusability
https://docs.google.com/forms/d/e/1FAIpQLSdk_kKDeznboWR8suYC0VsjZ4ndOM8cZQyJfhTfvLUKRh2vnw/viewform 3/5
10/18/21, 11:42 AM Test 6: Unit1 and Unit 2
1 point
Option 1
Polymorphism
Inheritance
Abstraction
Encapsulation
Type Casting
Type Hierarchy
None
Type Checking
https://docs.google.com/forms/d/e/1FAIpQLSdk_kKDeznboWR8suYC0VsjZ4ndOM8cZQyJfhTfvLUKRh2vnw/viewform 4/5
10/18/21, 11:42 AM Test 6: Unit1 and Unit 2
Procedural Abstraction
Data Abstraction
Iteration Abstraction
None
Page 1 of 1
This form was created inside of JC Bose University of Science and Technology, YMCA Faridabad. Report Abuse
Forms
https://docs.google.com/forms/d/e/1FAIpQLSdk_kKDeznboWR8suYC0VsjZ4ndOM8cZQyJfhTfvLUKRh2vnw/viewform 5/5
12/21/21, 10:49 AM Unit -2 Features of OOP Test
All
Function overloading
Templates
Operator overloading
Code Segment
Heap
Data Segment
Stack
https://docs.google.com/forms/d/e/1FAIpQLSd8Oso4MlVrHvpZhwmCwoG8t3D_e6w-yC7A9OXwOyMqUGNfBQ/viewscore?vc=0&c=0&w=1&flr=0… 1/6
12/21/21, 10:49 AM Unit -2 Features of OOP Test
Interfaces
Access Modifiers
Method signature
Classes
->obj
*obj
&obj
none
Correct answer
&obj
Which inheritance type is used in the class given below? class A : public 1/1
X, public Y *
Hierarchical Inheritance
Hybrid inheritance
Multilevel inheritance
Multiple inheritance
https://docs.google.com/forms/d/e/1FAIpQLSd8Oso4MlVrHvpZhwmCwoG8t3D_e6w-yC7A9OXwOyMqUGNfBQ/viewscore?vc=0&c=0&w=1&flr=0… 2/6
12/21/21, 10:49 AM Unit -2 Features of OOP Test
Not accessible
Correct answer
Not accessible
Errors
Catch
Exceptions
Try
https://docs.google.com/forms/d/e/1FAIpQLSd8Oso4MlVrHvpZhwmCwoG8t3D_e6w-yC7A9OXwOyMqUGNfBQ/viewscore?vc=0&c=0&w=1&flr=0… 3/6
12/21/21, 10:49 AM Unit -2 Features of OOP Test
The feature by which one object can interact with another object is...... * 1/1
Data transfer
Message Passing
Message reading
Data Binding
How many catch blocks you can use with single Try block? * 1/1
Only 2
Only 1
As many as required
Maximum 256
https://docs.google.com/forms/d/e/1FAIpQLSd8Oso4MlVrHvpZhwmCwoG8t3D_e6w-yC7A9OXwOyMqUGNfBQ/viewscore?vc=0&c=0&w=1&flr=0… 4/6
12/21/21, 10:49 AM Unit -2 Features of OOP Test
Encapsulation
Polymorphism
Inheritance
Abstraction
String
Int
Class
Double
Correct answer
https://docs.google.com/forms/d/e/1FAIpQLSd8Oso4MlVrHvpZhwmCwoG8t3D_e6w-yC7A9OXwOyMqUGNfBQ/viewscore?vc=0&c=0&w=1&flr=0… 5/6
12/21/21, 10:49 AM Unit -2 Features of OOP Test
D. Both A and B
This form was created inside of JC Bose University of Science and Technology, YMCA Faridabad.
Forms
https://docs.google.com/forms/d/e/1FAIpQLSd8Oso4MlVrHvpZhwmCwoG8t3D_e6w-yC7A9OXwOyMqUGNfBQ/viewscore?vc=0&c=0&w=1&flr=0… 6/6
11/18/21, 10:26 AM Test -Unit -3, Design Patterns
Draft saved
* Required
Which Factory Method pattern uses inheritance and relies on a subclass to 1 point
None
Factory Method
Bridge
Define one to many dependency between objects so that when one object 1 point
change state, all its dependent are notified and updated automatically *
Observer
Bridge
Singleton
https://docs.google.com/forms/d/e/1FAIpQLSfsGVixl-KV0KAMfJQdInTCNbBRp8wM5WgxuBJye0F7CvNj3Q/viewform 1/4
11/18/21, 10:26 AM Test -Unit -3, Design Patterns
Define an interface for creating an object, but let the subclasses decide 1 point
which class to instantiate. It let the instantiation differ to subclasses *
Abstract Factory
Factory Method
Bridge
Singleton
This pattern involves a single class which is responsible to create an object while
making sure that only single object gets created.
Singleton class provides a way to access its only object which can be accessed
directly without need to instantiate the object of the class.
Which of the following is true about the Bridge pattern correctly * 1 point
A - This pattern builds a complex object using simple objects and using a step by step
approach.
D - Both B & C
E- Both A & D
https://docs.google.com/forms/d/e/1FAIpQLSfsGVixl-KV0KAMfJQdInTCNbBRp8wM5WgxuBJye0F7CvNj3Q/viewform 2/4
11/18/21, 10:26 AM Test -Unit -3, Design Patterns
These design patterns provide a way to create objects while hiding the creation logic,
rather than instantiating objects directly using new opreator.
These design patterns concern class and object composition. Concept of inheritance
is used to compose interfaces and define ways to compose objects to obtain new
functionalities.
Which of the following pattern is used to get a way to access the elements 1 point
Iterator Pattern
Observer Pattern
None
Flyweight Pattern used when the application does not depend on object identity
https://docs.google.com/forms/d/e/1FAIpQLSfsGVixl-KV0KAMfJQdInTCNbBRp8wM5WgxuBJye0F7CvNj3Q/viewform 3/4
11/18/21, 10:26 AM Test -Unit -3, Design Patterns
Design patterns are obtained by trial and error by numerous software developers over
quite a substantial period of time.
Design patterns are solutions to general problems that software developers faced
during software development.
Page 1 of 1
This form was created inside of JC Bose University of Science and Technology, YMCA Faridabad. Report Abuse
Forms
https://docs.google.com/forms/d/e/1FAIpQLSfsGVixl-KV0KAMfJQdInTCNbBRp8wM5WgxuBJye0F7CvNj3Q/viewform 4/4
12/21/21, 10:48 AM Unit-4 Test
Unit-4 Test
Time: 10 Minutes No. Of Questions: 10 Marks: 10
None
https://docs.google.com/forms/d/e/1FAIpQLScmsMCsfXXF6cSMOATYRt8hZymteoVxCXfrQ5hndJJJ6CAfMw/viewscore?vc=0&c=0&w=1&flr=0&vi… 1/4
12/21/21, 10:48 AM Unit-4 Test
HashMap
ArrayList
HashSet
None
&
https://docs.google.com/forms/d/e/1FAIpQLScmsMCsfXXF6cSMOATYRt8hZymteoVxCXfrQ5hndJJJ6CAfMw/viewscore?vc=0&c=0&w=1&flr=0&vi… 2/4
12/21/21, 10:48 AM Unit-4 Test
If T<:U, and a program expects a value of type U, then one can substitute a value of
type T in its place
If 'Integer' and 'Float' are the subtype of 'Number' then 'Integer' and 'Float' are
subtypes of each other.
HashMap
LinkedHashMap
TreeMap
All allow
None
Templates
Function Overloading
Type Casting
https://docs.google.com/forms/d/e/1FAIpQLScmsMCsfXXF6cSMOATYRt8hZymteoVxCXfrQ5hndJJJ6CAfMw/viewscore?vc=0&c=0&w=1&flr=0&vi… 3/4
12/21/21, 10:48 AM Unit-4 Test
What will happen if you try to store a key which is already present in HashMap *
None is true
This form was created inside of JC Bose University of Science and Technology, YMCA Faridabad.
Forms
https://docs.google.com/forms/d/e/1FAIpQLScmsMCsfXXF6cSMOATYRt8hZymteoVxCXfrQ5hndJJJ6CAfMw/viewscore?vc=0&c=0&w=1&flr=0&vi… 4/4
12/21/21, 10:47 AM Unit-5 Test
setFrame()
setLayout()
SetWindow()
setContainer()
What will happen if you try to store a key which is already present in 1/1
HashMap *
None is true
https://docs.google.com/forms/d/e/1FAIpQLSfksTZs5WnyhwvNm_8Jrwu08cTzYlsKQnW5bW8JRvl802VXjw/viewscore?vc=0&c=0&w=1&flr=0&vie… 1/4
12/21/21, 10:47 AM Unit-5 Test
ScrollBar is a Container
A ScrollPane handles its own events and performs its own scrolling
ScrollPane is a component
Swing components use the screen resource of an ancestor instead of having their
own
None
Correct answer
Swing components use the screen resource of an ancestor instead of having their
own
It manages the components in such a manner that only one component is visible at
a time
https://docs.google.com/forms/d/e/1FAIpQLSfksTZs5WnyhwvNm_8Jrwu08cTzYlsKQnW5bW8JRvl802VXjw/viewscore?vc=0&c=0&w=1&flr=0&vie… 2/4
12/21/21, 10:47 AM Unit-5 Test
Event
Response
Action
Event Handler
Layout Manager
Layout
None
Container Manager
Correct answer
Layout Manager
Process
threads
both
none
https://docs.google.com/forms/d/e/1FAIpQLSfksTZs5WnyhwvNm_8Jrwu08cTzYlsKQnW5bW8JRvl802VXjw/viewscore?vc=0&c=0&w=1&flr=0&vie… 3/4
12/21/21, 10:47 AM Unit-5 Test
HashMap
LinkedHashMap
TreeMap
All allow
This form was created inside of JC Bose University of Science and Technology, YMCA Faridabad.
Forms
https://docs.google.com/forms/d/e/1FAIpQLSfksTZs5WnyhwvNm_8Jrwu08cTzYlsKQnW5bW8JRvl802VXjw/viewscore?vc=0&c=0&w=1&flr=0&vie… 4/4
Q1. The correct way of inheritance for Dog and Animal is:
a. Class Dog :public Animal
b. Class Animal : public Dog
c. Both
d. None
Ans: a
Q2. A private member of a class is visible to:
a. Everywhere
b. In sub class
c. Members to same package
d. Only members of same class
Ans: d
Q8. A member function will accept two argument in case of binary operator overloading. State
whether this statement is true or false.
a. True
b. False
Ans b
Q12. Which of the following is true about constructors. 1) They cannot be virtual. 2) They
cannot be private. 3) They are automatically called by new operator.
a. All 1, 2, and 3
b. Only 1 and 3
c. Only 1 and 2
d. Only 2 and 3
Ans b
Q15. Like constructors, can there be more than one destructors in a class?
A. Yes
B. No
Ans b
Operator overloading and Inheritance
Ans. e
Q2. While overloading binary operators using member function, it requires ___ argument/s.
a. Zero
b. One
c. Two
d. Three
Ans. B
Q8. To perform the conversion from any other data type or class to a class type, a ………….. should
be used in the destination class.
A) casting operator
B) constructor
C) not applicable
D) operator function
Ans. B
Ans.:c c
Explanation: When 2 or more classes inherit the same class using multiple inheritance and then
one more class inherits those two base classes, we get a diamond like structure. Here, ambiguity
arises when same function gets derived into 2 base classes and finally to 3rd level class because
same name functions are being inherited.
Q10. While inheriting a class, if no access mode is specified, then which among the following is
true? (in C++)
a) It gets inherited publicly by default
b) It gets inherited protected by default
c) It gets inherited privately by default
d) It is not possible
Answer: c
Q11. If a base class is inherited in protected access mode then which among the following is
true?
a) Public and Protected members of base class becomes protected members of derived class
b) Only protected members become protected members of derived class
c) Private, Protected and Public all members of base, become private of derived class
d) Only private members of base, become private of derived class
Answer: a
Q12. If base class has constructor with arguments, then it is ________________ for the derived
class to have constructor and pass the arguments to base class constructor.
a. Optional
b. Mandatory
c. Compiler dependent
d. Error
Ans. b
Q13. In case of inheritance where both base and derived class are having constructor and
destructor, then which if the following are true ?
1. Constructors are executed in their order of derivation
2. Constructors are executed in reverse order of derivation
3. Destructors are executed in their order of derivation
4. Destructors are executed in reverse order of derivation
a. Only 2 ,4
b. Only 1 , 3
c. Only 1 , 4
d. Only 2, 3
Ans. C
Q14. When a base class is privately inherited by derived class public members of the base class can
only be accessed by the ……… of the derived class.
A) non-member functions
B) friend functions
C) member functions
D) class members
Ans. C
Q15. What will be the order of execution of base class constructors in the following method of
inheritance?
class A: public B, public C {….};
A) B(); C(); A();
B) C(); B(); A();
C) A(); B(); C();
D) B(); A(); C();
Ans. A
Templates, Exception handling and Last unit
Q2. Which of the following is true about exception handling in C++? 1) There is a
standard exception class like Exception class in Java. 2) All exceptions are unchecked
in C++, i.e., compiler doesn't check if the exceptions are caught or not. 3) In C++, a
function can specify the list of exceptions that it can throw using comma separated list
like following.
void fun(int a, char b) throw (Exception1, Exception2, ..)
a. 1 and 3
b. 1 and 2
c. 2 and 3
d. 1, 2 and 3
Ans. D
2) We can write one function that can be used for all data types including user defined
types. Like sort(), max(), min(), ..etc.
3) We can write one class or struct that can be used for all data types including user
defined types. Like Linked List, Stack, Queue ..etc.
Q7. Which of the following is incorrect in C++ ? (1)When we write overloaded function
we must code the function for each usage. (2)When we write function template we code
the function only once. (3)It is difficult to debug macros (4)Templates are more efficient
than macros
A. 1 and 2
B. 1, 2 and 3
C. 3 and 4
D. None of them
Ans. D bcoz all are correct
1 Generic programming
3 Encapsulation
a. Only 1 and 2
b. Only 1 and 3
c. 1, 2 and 3
d. None
Ans. A
a. Yes
b. No
Ans. A
Q12. In ………… stage of SDLC, training of the user staff, system documentation and implementation is
done.
A. system design
B. system implementation
C. system analysis
D. system development
Ans. B
A. Small projects
B. Complex projects
C. Accommodating changes
D. Maintenance Projects
Ans. C
a. Verification
b. Validation
c. Both
d. None
Ans. A
Ans. E
Unit – 1, 5
Q1. Which of these is an example of decomposition?
a) Breaking the problem of organising a cake sale into smaller parts, such as who will
bake the cakes and when to hold the cake sale.
b) Taking the problem of baking a cake and thinking about how we can make it the best
cake possible.
c) Looking at what different kinds of cake can be made.
Ans a
int main(void)
{
Derived q;
return 0;
}
a) Compiler Error: there cannot be an empty derived class
b) Compiler Error: Derived is abstract
c) No compiler Error
Ans b
Q6. Which is the container that doesn't contain title bar and MenuBars but it can have
other components like button, textfield etc?
a. Window
b. Frame
c. Panel
d. Container
ANS. C
a) Swing
b) AWT
c) Both a and b
d) None of the above
Ans. A
Q8. Swing is a part of JFC (Java Foundation Classes) that is used to create GUI application.
a) True
b) False
Ans. True
Q9. The ActionListener interface is not used for handling action events.
a) True
b) False
Ans. False
Q10. Which of these packages contains all the classes and methods required for even
handling in Java?
java.applet
b. java.awt
c. java.event
d. java.awt.event
Ans. D
a. ActionEvent
b. KeyEvent
c. WindowEvent
d. AdjustmentEvent
Ans. A
Q13. What is an event in delegation event model used by Java programming language?
a. Exception Handling
b. String Handling
c. Event Handling
d. None of the above
Ans c
Unit 3, 4
1) Which of the following pattern creates object without exposing the creation logic to the
client and refer to newly created object using a common interface?
A. Factory Pattern
B - Abstract Factory Pattern
C - Singleton Pattern
D - Transfer Object Pattern
Ans A
3) Which of these is an correct way making a list that is upper bounded by class
Number?
a) List<? extends Number>
b) List<extends ? Number>
c) List(? extends Number)
d) List(? UpperBounds Number)
Ans A
• A. A group of objects
• B. A group of classes
• C. A group of interfaces
Ans A
• A. Set
• B. List
• C. Comparator
• D. Collection
Ans B
• A. List
• B. Set
• C. SortedMap
• D. SortedList
Ans D
• A. Set
• B. Array
• C. List
• D. Collection
Ans D
10) Which of these methods can randomize all elements in a list?
• A. rand()
• B. randomize()
• C. shuffle()
• D. ambigous()
Ans C
• A. Model-View-Controller.
• B.Modern-View-Controller.
• C.Model-View-Constant.
• D.None of these
Ans A
• A. Set
• B. List
• C. Array
• D. Collection
Ans A
8) In ………… stage of SDLC, training of the user staff, system documentation and
implementation is done.
A. system design
B. system implementation
C. system analysis
D. system development
Ans. B
9) Which is the container that doesn't contain title bar and MenuBars but it can have
other components like button, textfield etc?
a. Window
b. Frame
c. Panel
d. Container
ANS. C
11)
1.OOPs Ce51 sessional
Answer: (E)
2.While overloading binary operators using member function, it requires ___ argument/s.
A. Zero
B. One
C. Two
D. Three
Answer : (B)
Answer: Option C
Answer: (B)
Yes
No
Answer : (No)
6.What is operator overloading in C++?
(a) Overriding the operator meaning by the user defined meaning for user defined data type
(b) Redefining the way operator works for user defined types
(c) Ability to provide the operators with some special meaning for user defined data type
Answer (D)
Answer: a
8.
Static data member is initialized by zero. No other initialization is allowed
State whether this statement is true or false.
True
False
Answer : False
9.A member function will accept two argument in case of binary operator overloading. State
whether this statement is true or false. *
True
False
Answer : True
A. Friend functions use the dot operator to access members of a class using class objects
B. Friend functions can be private or public
C. Friend cannot access the members of the class directly
D. All of the above
Ans : D
Answer: d
Answer : ~A() { }
Answer : C
14.When using __________ overloading through a member function, the left hand operand
must be an object of the relevant class.
A. Unary operators
B. Binary operators
C. Arithmetic operators
D. Function operator
Answer: Option B
Answer: (B)
Answer : Function
Answer: (B)
Answer: b
25. While inheriting a class, if no access mode is specified, then which among the following is
true? (in C++)
Answer C
26.To perform the conversion from any other data type or class to a class type, a …………..
should be used in the destination class.
A) casting operator
B) constructor
C) not applicable
D) operator function
Answer B
Answer: a
28. If base class has constructor with arguments, then it is ________________ for the derived
class to have constructor and pass the arguments to base class constructor.
a. Optional
b. Mandatory
c. Compiler dependent
d. Error
ANSWER: Mandatory
29.When a base class is privately inherited by derived class public members of the base class
can only be accessed by the ……… of the derived class.
A) non-member functions
B) friend functions
C) member functions
D) class members
30. What will be the order of execution of base class constructors in the following method of
inheritance.class a: public b, public c {...};
Ans : A
31. To perform the conversion from any other data type or class to a class type, a …………..
should be used in the destination class.
A) casting operator
B) constructor
C) not applicable
D) operator function
Answer: B) constructor
32.If a base class is inherited in protected access mode then which among the following is true?
a) Public and Protected members of base class becomes protected members of derived class
b) Only protected members become protected members of derived class
c) Private, Protected and Public all members of base, become private of derived class
d) Only private members of base, become private of derived class
Answer: a
17/12/2021, 12:01 Test 4
PPS
0 of 0 points
Name
Rahul Arora
Roll No
19002030025
MCQ 5 of 15 points
Breaking the problem of organising a cake sale into smaller parts, such as who
will bake the cakes and when to hold the cake sale.
Taking the problem of baking a cake and thinking about how we can make it the best
cake possible.
https://docs.google.com/forms/d/e/1FAIpQLSdV3kqzOjOM5RIdmPeFf1f0dFpk5NjnpzMKmIYNADj6kfbeSQ/viewscore?viewscore=AE0zAgCQrB4oIJOs27Q… 1/7
17/12/2021, 12:01 Test 4
Dependency of subproblems
All of them
Correct answer
All of them
Iteration Abstraction
Type Hierarchy
Specification Abstraction
Data Abstraction
Correct answer
Specification Abstraction
No
Yes
Correct answer
No
https://docs.google.com/forms/d/e/1FAIpQLSdV3kqzOjOM5RIdmPeFf1f0dFpk5NjnpzMKmIYNADj6kfbeSQ/viewscore?viewscore=AE0zAgCQrB4oIJOs27Q… 2/7
17/12/2021, 12:01 Test 4
No compiler Error
Correct answer
Which is the container that doesn't contain title bar and MenuBars but it 0/1
can have other components like button, textfield etc? *
Window
Frame
Container
Panel
Correct answer
Panel
https://docs.google.com/forms/d/e/1FAIpQLSdV3kqzOjOM5RIdmPeFf1f0dFpk5NjnpzMKmIYNADj6kfbeSQ/viewscore?viewscore=AE0zAgCQrB4oIJOs27Q… 3/7
17/12/2021, 12:01 Test 4
Swing
Both a and b
AWT
Swing is a part of JFC (Java Foundation Classes) that is used to create 0/1
GUI application. *
False
True
Correct answer
True
The ActionListener interface is not used for handling action events. * 1/1
False
True
https://docs.google.com/forms/d/e/1FAIpQLSdV3kqzOjOM5RIdmPeFf1f0dFpk5NjnpzMKmIYNADj6kfbeSQ/viewscore?viewscore=AE0zAgCQrB4oIJOs27Q… 4/7
17/12/2021, 12:01 Test 4
Which of these packages contains all the classes and methods required 1/1
for even handling in Java? *
java.event
java.applet
java.awt.event
java.awt
Correct answer
KeyEvent
AdjustmentEvent
WindowEvent
ActionEvent
Correct answer
ActionEvent
https://docs.google.com/forms/d/e/1FAIpQLSdV3kqzOjOM5RIdmPeFf1f0dFpk5NjnpzMKmIYNADj6kfbeSQ/viewscore?viewscore=AE0zAgCQrB4oIJOs27Q… 5/7
17/12/2021, 12:01 Test 4
An event is an object that describes any change by the user and system.
Correct answer
Correct answer
https://docs.google.com/forms/d/e/1FAIpQLSdV3kqzOjOM5RIdmPeFf1f0dFpk5NjnpzMKmIYNADj6kfbeSQ/viewscore?viewscore=AE0zAgCQrB4oIJOs27Q… 6/7
17/12/2021, 12:01 Test 4
The Following steps are required to perform 1) Implement the Listener 1/1
interface and overrides its methods. 2) Register the component with the
Listener. *
Event Handling
String Handling
Exception Handling
This form was created inside of JC Bose University of Science and Technology, YMCA Faridabad.
Forms
https://docs.google.com/forms/d/e/1FAIpQLSdV3kqzOjOM5RIdmPeFf1f0dFpk5NjnpzMKmIYNADj6kfbeSQ/viewscore?viewscore=AE0zAgCQrB4oIJOs27Q… 7/7
23/12/2021, 12:03 Test 5
0 of 0 points
Name *
Rahul Arora
Roll No. *
19002030070
OOPS 3 of 15 points
Which of the following pattern creates object without exposing the 0/1
creation logic to the client and refer to newly created object using a
common interface? *
Factory Pattern
Singleton Pattern
Correct answer
Factory Pattern
https://docs.google.com/forms/d/e/1FAIpQLSfcik6459QQFrKre4OmaFEinm4Eut-hgc95YAcLJreERDVihQ/viewscore?viewscore=AE0zAgBMtkbihLFdsrcA6… 1/8
23/12/2021, 12:03 Test 5
Which of these is an correct way making a list that is upper bounded by 0/1
class Number? *
List<extends ? Number>
Correct answer
&
A group of interfaces
A group of objects
A group of classes
Correct answer
A group of objects
https://docs.google.com/forms/d/e/1FAIpQLSfcik6459QQFrKre4OmaFEinm4Eut-hgc95YAcLJreERDVihQ/viewscore?viewscore=AE0zAgBMtkbihLFdsrcA6… 2/8
23/12/2021, 12:03 Test 5
Singleton class provides a way to access its only object which can be accessed
directly without need to instantiate the object of the class.
This pattern involves a single class which is responsible to create an object while
making sure that only single object gets created.
Correct answer
This type of pattern are specifically concerned with the presentation tier.
This type of patterns concern class and object composition. Concept of inheritance
is used to compose interfaces and define ways to compose objects to obtain new
functionalities.
This type of patterns provide a way to create objects while hiding the creation logic,
rather than instantiating objects directly using new opreator
Correct answer
This type of patterns concern class and object composition. Concept of inheritance
is used to compose interfaces and define ways to compose objects to obtain new
functionalities.
https://docs.google.com/forms/d/e/1FAIpQLSfcik6459QQFrKre4OmaFEinm4Eut-hgc95YAcLJreERDVihQ/viewscore?viewscore=AE0zAgBMtkbihLFdsrcA6… 3/8
23/12/2021, 12:03 Test 5
List
Comparator
Collection
Set
Correct answer
List
SortedList
Set
SortedMap
List
Correct answer
SortedList
https://docs.google.com/forms/d/e/1FAIpQLSfcik6459QQFrKre4OmaFEinm4Eut-hgc95YAcLJreERDVihQ/viewscore?viewscore=AE0zAgBMtkbihLFdsrcA6… 4/8
23/12/2021, 12:03 Test 5
Which of these is Basic interface that all other interface inherits? * 0/1
List
Array
Set
Collection
Correct answer
Collection
rand()
randomize()
ambigous()
shuffle()
Correct answer
shuffle()
https://docs.google.com/forms/d/e/1FAIpQLSfcik6459QQFrKre4OmaFEinm4Eut-hgc95YAcLJreERDVihQ/viewscore?viewscore=AE0zAgBMtkbihLFdsrcA6… 5/8
23/12/2021, 12:03 Test 5
Modern-View-Controller.
Model-View-Constant.
Model-View-Controller.
None of these
Correct answer
Model-View-Controller.
These design patterns provide a way to create objects while hiding the creation
logic, rather than instantiating objects directly using new opreator.
Correct answer
These design patterns provide a way to create objects while hiding the creation logic,
rather than instantiating objects directly using new opreator.
https://docs.google.com/forms/d/e/1FAIpQLSfcik6459QQFrKre4OmaFEinm4Eut-hgc95YAcLJreERDVihQ/viewscore?viewscore=AE0zAgBMtkbihLFdsrcA6… 6/8
23/12/2021, 12:03 Test 5
Set
List
Array
Collection
They delegate activities to other portions of the sub-system to which they provide an
interface
Correct answer
This form was created inside of JC Bose University of Science and Technology, YMCA Faridabad.
Forms
https://docs.google.com/forms/d/e/1FAIpQLSfcik6459QQFrKre4OmaFEinm4Eut-hgc95YAcLJreERDVihQ/viewscore?viewscore=AE0zAgBMtkbihLFdsrcA6… 7/8
23/12/2021, 12:03 Test 5
https://docs.google.com/forms/d/e/1FAIpQLSfcik6459QQFrKre4OmaFEinm4Eut-hgc95YAcLJreERDVihQ/viewscore?viewscore=AE0zAgBMtkbihLFdsrcA6… 8/8