Warning: foreach() argument must be of type array|object, bool given in /var/www/html/web/app/themes/studypress-core-theme/template-parts/header/mobile-offcanvas.php on line 20

Problem 1

Which of the following are applications of design patterns? Explain your conclusions. (a) An object-orientated design (b) The ability to vary the order in which a print() method is applied to the elements of a Vector (c) Varying the order in which a method is applied to the elements of a collection of objects by introducing a class whose methods include a method like goToNextElement() (d) Capturing the mutual behavior of a pair of objects of two classes (e) Capturing the mutual behavior of a pair of objects of two classes by introducing a third class aggregating the two classes

Problem 2

Characterize the following design purpose as creational, structural, or bebavioral. Explain your conclusion clearly. We must build an application with 15 different screens involving various combinations of 6 user interface controls (e.g., list boxes) arranged in a simple grid. Performing a mouse action or text entry on a control (e.g., a button) in a screen affects other controls on the same screen. In all other respects the screens are not related and are not similar in appearance. The composition of these screens is very unlikely to change.

Problem 3

Characterize the following design purpose as creational, structural, or behavioral. Explain your conclusion clearly. We must build a human resources application dealing with the management structure at a large company. We need to represent the organization chart within the application.

Problem 4

Characterize the following design purpose as creational, structural, or behavioral. Explain your conclusion clearly. We must build an application that allows users to build and change their stock portfolio with a various kinds of mutual fund picks from specified subcategories. The mutual fund categories are technology, old industries, utilities, real estate, and mining. The application allows users to pick categories. It then makes portfolio recommendations depending on the user's choice. For example, the user can ask for a low-risk portfolio of utilities and mining stocks, and the application describes its recommendations within these constraints.

Problem 5

Consider the following two statements. (a) Observer consists of an object of a class that reflects a data source, together with objects of classes that depend on the data source. (b) When the data changes value, a method with the name update() is called on each observing object. Which of these two statements takes a static viewpoint and which a dynamic viewpoint?

Access millions of textbook solutions in one place

  • Access over 3 million high quality textbook solutions
  • Access our popular flashcard, quiz, mock-exam and notes features
  • Access our smart AI features to upgrade your learning
Get Vaia Premium now
Access millions of textbook solutions in one place

Recommended explanations on Computer Science Textbooks