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.


Report A owns Page p while a viewer references that page and Report B has no pages.


Choose an answer

Create a free account to get started

Unlock full course notes by signing up

  • Video lessons taught by top educators
  • Practice questions with guided solutions
  • Written review notes for reference
  • Expert answers anytime from course tutors

More Aggregation Questions: