logo

Crowdly

2025W Software Design, Architecture (CS-3620-01)

Шукаєте відповіді та рішення тестів для 2025W Software Design, Architecture (CS-3620-01)? Перегляньте нашу велику колекцію перевірених відповідей для 2025W Software Design, Architecture (CS-3620-01) в moodle31.upei.ca.

Отримайте миттєвий доступ до точних відповідей та детальних пояснень для питань вашого курсу. Наша платформа, створена спільнотою, допомагає студентам досягати успіху!

The Template Method design pattern lets redefine certain steps of an algorithm without changing the algorithm structure.

Переглянути це питання

The State

Pattern allows

an object to alter its

when its

internal state changes.

Переглянути це питання

A is an object that “stands-in” for a real object.

Переглянути це питання

You are implementing a document editor that can embed graphical objects in a document. Some graphical objects, like large images, can be expensive to create. But opening a document should be fast, so we should avoid creating all the expensive objects at once when the document is opened. Especially since not all of these objects will be visible in the document at the same time.

Taking this into consideration we want to create each expensive object on demand, which in this case occurs when an image becomes visible. What design pattern would you use to solve this problem? Explain your decision.

Переглянути це питання

You are implementing a drawing editor that lets users draw and arrange graphical elements such as lines, polygons, text, etc. The interface for graphical objects is defined by an abstract class called Shape. The editor defines a subclass of Shape for each kind of graphical object: a LineShape class for lines, a PolygonShape class for polygons, and so forth.

Classes for elementary geometric shapes like LineShape and PolygonShape are rather easy to implement, but a TextShape subclass that can display and edit text is considerably more difficult. However, you found an off-the-shelf user interface toolkit which already provides a sophisticated TextView class for displaying and editing text. Ideally we'd like to reuse TextView to implement TextShape, but the toolkit wasn't designed with Shape classes in mind. So we can't use TextView and Shape objects interchangeably.

How can existing and unrelated classes like TextView work in an application that expects classes with a different and incompatible interface? What design pattern would you use to solve this problem? Explain your decision.

Переглянути це питання

When studying the Adapter Pattern, the example we

looked at was technically an “Object Adapter Pattern”.  Why don’t we use the “Class Adapter Pattern”

in Java?

Переглянути це питання

State a circumstance in which you would prefer an

abstract class to an interface.

Переглянути це питання

The Abstract Factory pattern provides an interface for creating of related or dependent objects without specifying their concrete classes.

Переглянути це питання

To create a singleton class we must:

Переглянути це питання

The Factory Method pattern defines an interface for creating objects, but let the decide which class to instantiate.

Переглянути це питання

Хочете миттєвий доступ до всіх перевірених відповідей на moodle31.upei.ca?

Отримайте необмежений доступ до відповідей на екзаменаційні питання - встановіть розширення Crowdly зараз!