Answered step by step
Verified Expert Solution
Link Copied!

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

image text in transcribed

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

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image_2

Step: 3

blur-text-image_3

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Database And Expert Systems Applications Dexa 2023 Workshops 34th International Conference Dexa 2023 Penang Malaysia August 28 30 2023 Proceedings

Authors: Gabriele Kotsis ,A Min Tjoa ,Ismail Khalil ,Bernhard Moser ,Atif Mashkoor ,Johannes Sametinger ,Maqbool Khan

1st Edition

303139688X, 978-3031396885

More Books

Students also viewed these Databases questions

Question

Describe the infrastructure trap.

Answered: 1 week ago

Question

2. Identify conflict triggers in yourself and others

Answered: 1 week ago