uc 18 - yshehab/SchoolRoomBooking GitHub Wiki
public void addSchool(String aName, Address anAddress, Room aRoom)
Given: name Infant School, the Address object address2, and the Room object room1
- Check if a school with the same name and address is linked to letting
As no school matches:
- a new School object school 3 is created with the name Infant School
- school3 records a reference to address2
- school3 records a reference to room1
- letting records a reference to school3
If a school already exists with the same name and address, do nothing
- private collection
<School>
school
public void addSchool(String aName, Address anAddress, Room aRoom)
- none
public void addSchool(String aName, Address anAddress)
Given: name Infant School, and address2 an Address object
- Check if a school with the same name and address is linked to letting
As no school matches:
- a new School object school 3 is created with the supplied attributes
- letting records a reference to school3
If a school already exists with the same name and address, do nothing
- none
public void addSchool(String aName, Address anAddress)
- none