A laboratory keeps three independently managed probe objects, P1, P2 and P3, in a registry. Each identifier names a different object. P1 and P2 are both model M4; P3 is model K8.
Monitoring groups R and S aggregate probes by storing references. Initially, R contains only P1 and S contains only P2. Within one group, an addition is rejected if that exact probe is already a member. Matching model names do not cause rejection, and a probe may belong to both groups. A rejected addition leaves memberships unchanged. No attempt creates or deletes a probe.
Process the attempts in the table from top to bottom. For each attempt, enter accepted or rejected and the number of probe references in each group immediately afterward. Enter counts as exact integers.
Unlock full course notes by signing up
Counting dashboards and their parts
A dashboard application has four Dashboard objects. Each exclusively owns three distinct Widget objects through composition. Every Widget references one existing Dataset object. There are five distinct Dataset objects in total, and an independent registry retains all five throughout the scenario.
Deleting a Dashboard logically deletes its currently owned Widgets. No Widgets are detached, and no Dataset objects are deleted. Count only Dashboard, Widget, and Dataset objects; exclude the registry and all stored references.
Find the initial total number of live objects and the total remaining after three Dashboards are deleted. Give both answers in objects, as whole numbers with zero decimal places.
Replacing shared layers with owned parts
An animation editor has six Scene objects, each of which must contain three distinct Layer objects. Its existing design fills these eighteen layer positions by sharing eight Layer objects among scenes.
A redesign introduces composition: every Layer must belong to exactly one Scene, and each Scene must still contain three distinct Layers. Each of the eight existing Layers can be assigned to any one Scene, and all eight may be reused. Creating a new Layer produces an independent object with no shared owned parts.
What is the minimum number of additional Layer objects required? Answer in additional Layer objects, as a whole number with zero decimal places.
Restoring shared probe references
A laboratory saves its probe objects separately from its monitoring groups. Each probe record has a unique identifier. A saved morning group lists probe identifiers P4 and P9, while a saved evening group lists P9. Both groups aggregate independently managed probes.
During restoration, both occurrences of P9 must resolve to the same restored probe instance. The saved data are valid: every group member identifier has exactly one corresponding probe record.
Arrange the phases of the procedure below in dependency order. Each phase must finish before the next begins, and the application receives the rebuilt groups only after the final identity check.
Transferring an owned page safely
A document editor models Report–Page using composition. Initially, Report A owns Page p, Report B owns no pages, and Viewer v stores a non-owning reference to p.
The model permits detaching a page without deleting it and attaching a detached page to another report. Deleting a report deletes every page it owns at that moment. There is no automatic ownership transfer when a report is deleted.
Treat each proposed sequence independently, starting from the initial state. Which statements are consistent with these rules? Select all that apply.