Java Reference
In-Depth Information
CHAPTER
14 A case study
Main concepts discussed in this chapter:
whole-application development
Java constructs discussed in this chapter:
(No new Java constructs are introduced in this chapter.)
In this chapter, we draw together many of the object-oriented principles that we have intro-
duced in this topic by presenting an extended case study. We shall take the study from the
initial discussion of a problem, through class discovery, design, and an iterative process of
implementation and testing. Unlike previous chapters, it is not our intention here to introduce
any major new topics. Rather, we are seeking to reinforce those topics that have been covered
in the second half of the topic, such as inheritance, abstraction techniques, error handling, and
application design.
14.1
The case study
The case study we will be using is the development of a model for a taxi company. The com-
pany is considering whether to expand its operations into a new part of a city. It operates taxis
and shuttles. Taxis drop their passengers at their target locations before taking on new pas-
sengers, whereas shuttles may collect several passengers from different locations on the same
trip, taking them to similar locations (such as collecting several guests from different hotels and
taking them to different terminals at the airport). Based on estimates of the number of potential
customers in the new area, the company wishes to know whether an expansion would be profit-
able and how many cabs it would need there in order to operate effectively.
14.1.1
The problem description
The following paragraph presents an informal description of the taxi company's operating pro-
cedures, arrived at following several meetings with them.
The company operates both individual taxis and shuttles. The taxis are used to transport
an individual (or small group) from one location to another. The shuttles are used to pick
 
 
Search WWH ::




Custom Search