logo

Crowdly

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

Looking for 2025W Software Design, Architecture (CS-3620-01) test answers and solutions? Browse our comprehensive collection of verified answers for 2025W Software Design, Architecture (CS-3620-01) at moodle31.upei.ca.

Get instant access to accurate answers and detailed explanations for your course questions. Our community-driven platform helps students succeed!

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

View this question

The State

Pattern allows

an object to alter its

when its

internal state changes.

View this question

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

View this question

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.

View this question

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.

View this question

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?

View this question

State a circumstance in which you would prefer an

abstract class to an interface.

View this question

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

View this question

To create a singleton class we must:

View this question

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

View this question

Want instant access to all verified answers on moodle31.upei.ca?

Get Unlimited Answers To Exam Questions - Install Crowdly Extension Now!