uc 18 v2 - yshehab/SchoolRoomBooking GitHub Wiki

18. Add a school to the system. Version 2

TO DO - revise

Coordinating method

public void addSchool(String aName, Address anAddress, Room aRoom)

Object diagram for a typical scenario.

Walk-through for this scenario

Given: name Infant School, the Address object address2, and the Room object room1

  1. Check if a school with the same name and address is linked to letting
    As no school matches:
  2. a new School object school 3 is created with the name Infant School
  3. school3 records a reference to address2
  4. school3 records a reference to room1
  5. letting records a reference to school3

Sequence diagram for this scenario

Notes on alternative scenario

If a school already exists with the same name and address, do nothing

Updates to implementation model

Classes

Class LettingCoord

Links
private collection <School> school
Methods
public void addSchool(String aName, Address anAddress, Room aRoom)`

Navigations

None

Discussion

18. Add a school to the system (Superseded version below - changed 9.11.13)

Coordinating method

public void addSchool(String aName, Address anAddress)

Object diagram for a typical scenario.

Walk-through for this scenario

Given: name Infant School, and address2 an Address object

  1. Check if a school with the same name and address is linked to letting
    As no school matches:
  2. a new School object school 3 is created with the supplied attributes
  3. letting records a reference to school3

Sequence diagram for this scenario

Notes on alternative scenario

If a school already exists with the same name and address, do nothing

Updates to implementation model

Classes

Class LettingCoord

Links

None

Methods
public void addSchool(String aName, Address anAddress)

Navigations

None

Discussion

⚠️ **GitHub.com Fallback** ⚠️