Java Reference
In-Depth Information
Although the initial design work was best done in a group, it is now time to split it up. If the
definition of the class interfaces and the documentation was done well, it should be possible to
implement the classes independently. Classes can now be assigned to programmers, who can
work on them alone or in pairs.
In the remainder of this chapter, we shall not discuss the implementation phase of the cinema
booking system in detail. That phase largely involves the sorts of task we have been doing
throughout this topic in previous chapters, and we hope that by now readers can determine for
themselves how to continue from here.
13.5
Prototyping
Instead of designing and then building the complete application in one giant leap, prototyping
can be used to investigate parts of a system.
A prototype is a version of the application where one part is simulated in order to experiment with
other parts. You may, for example, implement a prototype to test a graphical user interface. In that
case, the logic of the application may not be properly implemented. Instead, we would write sim-
ple implementations for those methods that simulate the task. For example, when calling a method
to find a free seat in the cinema system, a method could always return seat 3, row 15 instead of
actually implementing the search. Prototyping allows us to develop an executable (but not fully
functional) system quickly so that we can investigate parts of the application in practice.
Concept:
Prototyping is the
construction of a
partially working
system in which
some functions of
the application are
simulated. It serves
to provide an un-
derstanding early
in the development
process of how the
system will work.
Prototypes are also useful for single classes to aid a team development process. Often when dif-
ferent team members work on different classes, not all classes take the same amount of time to be
completed. In some cases, a missing class can hold up continuation of development and testing
of other classes. In those cases, it can be beneficial to write a class prototype. The prototype has
implementations of all method stubs, but instead of containing full, final implementations, the
prototype only simulates the functionality. Writing a prototype should be possible quickly, and
development of client classes can then continue using the prototype until the class is implemented.
As we discuss in Section 13.6, one additional benefit of prototyping is that it can give the devel-
opers insights into issues and problems that were not considered at an earlier stage.
Exercise 13.11 Outline a prototype for your cinema-system example. Which of the classes
should be implemented first, and which should remain in prototype stage?
Exercise 13.12 Implement your cinema-system prototype.
13.6
Software growth
Several models exist for how software should be built. One of the most commonly known is
often referred to as the waterfall model (because activity progresses from one level to the next,
like water in a cascading waterfall—there is no going back).
 
 
Search WWH ::




Custom Search