pkg core Organization - yshehab/SchoolRoomBooking GitHub Wiki
Core
Organization
A Organization in the system
private String name
private Address address
private Collection<Member>
members
References a collection of all linked Member objects
private Collection<Permit>
permits
References a collection of all linked Permit objects
___Organization(String name, Address address, Member aMember) ___
Postcondition: initialises a new Organization object with the given attribute values. A reference to the new Organization object is returned.
___public Boolean hasMember(Name aName, Address anAddress, Email anEmail) ___
Postcondition: returns True if the receivers members contains a Member with the supplied attributes
Note: at this point we have not created a Member object for comparison using isMember()
public Boolean isMember(Member aMember)
Post condition: returns true if aMember is in the receiver_s members, false otherwise
public collection<Booking>
getBookings()
Post condition: returns a collection of all Booking objects linked to all Permit objects in permits.
___public Collection <Permit>
getPermits() ___
Postcondition: returns a collection of all the linked Permit objects
___public Collection <Account>
getAccounts() ___
Postcondition: a collection of all the Account objects linked to the linked Permit objects is returned
___public Collection<Member>
getMembers() ___
Post-Condition: returns a collection of all the linked Member objects
___public void addmember(Member aMember) ___
Postcondition: a reference to aMember is recorded.
___public Permit addPermit(Member aMember) ___
Postcondition: A new Permit object is created with references to the receiver and aMember.. The organization records a reference to the new permit.