Answered step by step
Verified Expert Solution
Question
1 Approved Answer
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 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
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started