Java Reference
In-Depth Information
up individuals from different locations and transport them to their several destinations.
When the company receives a call from an individual, hotel, entertainment venue, or tour-
ist organization, it tries to schedule a vehicle to pick up the fare. If it has no free vehicles,
it does not operate any form of queuing system. When a vehicle arrives at a pickup loca-
tion, the driver notifies the company. Similarly, when a passenger is dropped off at their
destination, the driver notifies the company.
As we suggested in Chapter 10, one of the common purposes of modeling is to help us learn
something about the situation being modeled. It is useful to identify at an early stage what we
wish to learn, because the resulting goals may well have an influence on the design we produce.
For instance, if we are seeking to answer questions about the profitability of running taxis in
this area, then we must ensure that we can obtain information from the model that will help us
assess profitability. Two issues we ought to consider, therefore, are: how often potential cus-
tomers are lost because no vehicle is available to collect them and, at the opposite extreme, how
much time taxis remain idle for lack of passengers. These influences are not found in the basic
description of how the taxi company normally operates, but they do represent scenarios that
will have to be played through when we draw up the design.
So we might add the following paragraph to the description:
The system stores details about passenger requests that cannot be satisfied. It also pro-
vides details of how much time vehicles spend in each of the following activities: carrying
passengers, going to pickup locations, and being idle.
However, as we develop our model, we shall focus on just the original description of the com-
pany's operating procedures and leave the additional features as exercises.
Exercise 14.1 Is there any additional data that you feel it would be useful to gather from the
model? If so, add these requirements to the descriptions given above and use them in your
own extensions to the project.
14.2
Analysis and design
As suggested in Chapter 13, we will start by seeking to identify the classes and interactions in
the system's description, using the verb/noun method.
14.2.1
Discovering classes
The following (singular versions of) nouns are present in the description: company, taxi, shut-
tle, individual, location, destination, hotel, entertainment venue, tourist organization, vehicle,
fare, pickup location, driver, and passenger.
The first point to note is that it would be a mistake to move straight from this list of nouns to a set
of classes. Informal descriptions are rarely written in a way that suits that sort of direct mapping.
One refinement that is commonly needed in the list of nouns is to identify any synonyms : dif-
ferent words used for the same entity. For instance, “individual” and “fare” are both synonyms
for “passenger.”
 
 
Search WWH ::




Custom Search