Professional Documents
Culture Documents
1. NAME is an Abstract Type which can hold all the possible Names.
2. NATIONALITY is an Abstract Type which can hold all the possible Nationalities of the
Ship.
3. ADDRESS is an Abstract Type which can hold all the possible addresses of the Farmers.
4. PHONE_NUMBER is an Abstract Type which can hold all the possible phone number of
Farmers.
2) The following types are also used in the system for determining the status of Silo, Responses
for the operations taken by the Silos and also the operations performed by the silos.
1|Page
1. Silo
The Knownsilo is NAME is a powerset that contains the names of all the silos which
are already entered into the system.
Capacity is a function which returns the capacity of a given name of a silo.
Quantity is a function which returns the quantity of a given name of a silo.
Queue is a function which returns the queue of a given name of a silo.
Status is a function which returns the status of a given name of a silo.
InitSilo
Silo
knownsilo =
Silo
knownsilo : NAME
siloCapacity : NAME
siloQuantity : NAME
Enter_new_silo
2|Page
Silo
name? : NAME
capacity? : CAPACITY
quantity? : QUANTITY
name? : Knownsilo
2. Ship.
The Knownship NAME is a powerset that contains the names of all the ships which
are already entered into the system.
shipCapacity is a function which returns the capacity of a given name of a ship.
shipQuantity is a function which returns the quantity of a given name of a ship.
shipNationality is a function which returns the Nationaltiy of a given name of a ship.
3|Page
InitShip
Ship
knownship =
Ship
knownShip : NAME
shipQuantity : NAME
shipCapacity : NAME
3. Truck.
The KnownTruck NAME is a power set that contains all the registration number of
trucks which is already registered in the system.
truckEmptyWeight is a function which returns the weight of a given registration number
of a truck.
4|Page
truckQuantity is a function which returns the quantity of a given registration number
truck.
The truckQuantity must be greater than or equal to zero.
InitTruck
Truck
knownTruck =
Truck
knownTruckRegoNo :
truckEmptyWeight : Name
truckQuantity : Name
Accept_delivery
Truck
regono? : REGONO
truckemptyweight? : TRUCKEMPTYWEIGHT
5|Page
quantity? : QUANTITY
operation! : OPERATION
regono? : Known
OPERATION ! = truck(rego?)
4. Farmer
The KnownFarmer NAME is a power set that contains all the names of the farmers
which are already entered in the system.
farmerAddressis a function which returns the address of a given name of a farmer.
farmerPhone is a function which returns the phone number of a given name of a farmer.
InitFarmer
Farmer
knownFarmer =
Farmer
knownFarmer : NAME
6|Page
5. Farmers Account
The globalOp is a powerset of numbers which represents the operation number.
globalOpNo is a number which is the current operation number.
siloName is a function which returns the name of a silo for the given operation number.
opName is a function which returns the operation number.
vehicleName is a function which returns the name of a vehicle for the given operation
number.
quantiy is a function which returns the quantity of a silo for the given operation number.
farmerName is a function which returns the name of the farmer for the given operation
number.
Farmers_account
globalOp:
globalOpNo :
siloName : NAME
opName : OPERATION
vehicleName : NAME
quantity :
farmerName : NAME
7|Page
6. References
The Z Notation. (2015). Retrieved 5 October 2015, from http://www.rose-
hulman.edu/class/cs/cs415/zrm.pdf
8|Page