Question: 2. (7 points) Single choice. Select the best choice. (a) (1 point) is called generator expression, while is called list comprehension. A. x=[2x for x

 2. (7 points) Single choice. Select the best choice. (a) (1

2. (7 points) Single choice. Select the best choice. (a) (1 point) is called generator expression, while is called list comprehension. A. x=[2x for x in range(10) ] B. x=(2x for x in range (10)) (b) (1 point) Which of the following statement supports the following usage: next (x) ? A. x=[2x for x in range (10)] B. x=(2x for x in range(10)) (c) ( 1 point) Which of the following statement uses less memory? A. x=[2x for x in range (10000000000)] B. x=(2x for x in range (10000000000)) (d) (1 point) Use to bundle data and behaviours together. A. Abstraction B. Abstract Base classes C. Encapsulation D. Information hiding (e) (1 point) Use to ignore irrelevant details. A. Abstraction B. Abstract Base classes C. Encapsulation D. Information hiding (f) (1 point) In responsibility-driven design, a class has a Knows responsibility and a responsibility. A. Collaborates B. Does C. Overrides D. Tells Page 3 of 12 CONT'D... Introduction to Object-oriented Analysis and Design Fall 2022 (g) (1 point) Which one of the following design patterns is the best example for the Don't Repeat Yourself principle? A. The Decorator Pattern B. The Factory Pattern C. The Iterator Pattern D. The Template Pattern

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!