Author:halw

Date:2011-03-14T16:39:01.000000Z


git-svn-id: https://svn.eiffel.com/eiffel-org/trunk@845 abb3cda0-5349-4a8f-a601-0c33ac3a8c38
This commit is contained in:
halw
2011-03-14 22:22:36 +00:00
parent 883f507497
commit e28d9ccea4
2 changed files with 21 additions and 1 deletions

View File

@@ -0,0 +1,18 @@
[[Property:title|Quicksort]]
[[Property:weight|-7]]
[[Property:uuid|facf6973-e3c1-0a3f-b9e8-f55d1ca29a11]]
{{UnderConstruction}}
{{Beta}}
=Description=
=Highlights=

View File

@@ -21,7 +21,9 @@ features is restricted to the appropriate client classes through the clients par
The lifecycle of a passenger is simple: enter the bus stop. This is accomplished by making a [[Concurrent Eiffel with SCOOP#Separate types and separate calls|separate call]] to <code>{STATION}.enter</code> and passing <code>Current</code> (the passenger object itself) as an argument.
The lifecycle of the bus is slightly more complex: enter the bus stop, pick up passengers, leave the bus stop, wait for a short time. The bus repeats this sequence forever. The routines in class <code>BUS</code> for entering the bus stop, picking up passengers, and leaving the bus stop all accept as an argument the separate bus stop object (a_station: separate STATION) and make a [[Concurrent Eiffel with SCOOP#Separate types and separate calls|separate call]] to the corresponding routine in <code>STATION</code>.
The lifecycle of the bus is slightly more complex: enter the bus stop, pick up passengers, leave the bus stop, wait for a short time. The bus repeats this sequence forever. The routines in class <code>BUS</code> for entering the bus stop, picking up passengers, and leaving the bus stop all accept as an argument the separate bus stop object (<code>a_station: separate STATION</code>) and make a [[Concurrent Eiffel with SCOOP#Separate types and separate calls|separate call]] to the corresponding routine in <code>STATION</code>.
Features of the bus stop (class <code>STATION</code>) manage the queues for waiting and checked-in passengers and whether a bus is at the bus stop. Passengers are added to the waiting queue when they arrive at the station. When the bus leaves the station, any waiting passengers are transferred to the checked-in queue. When the bus arrives at the station, the passengers on the checked-in queue are allowed to board the bus (up to the first 50 passengers, that is), and the boarding passengers are then removed from the checked-in queue.