Java Reference
In-Depth Information
Other scenarios to play through next would include the following:
A customer requests five seats together. Work out exactly how five adjoining seats are found.
A customer calls and says he forgot the seat numbers he was given for the reservation he
made yesterday. Could you please look up the seat numbers again?
A customer calls to cancel a reservation. He can give his name and the show but has forgot-
ten the seat numbers.
A customer calls who already has a reservation. She wants to know whether she can reserve
another seat next to the ones she already has.
A show is canceled. The cinema wants to call all customers that have reserved a seat for that
These scenarios should give you a good understanding of the seat lookup and reservation part
of the system. Then we need another group of scenarios: those dealing with setting up the
theater and scheduling shows. Here are some possible scenarios:
The system has to be set up for a new cinema. The cinema has two theaters, each of a differ-
ent size. Theater A has 26 rows with 18 seats each. Theater B has 32 rows. In this theater, the
first six rows have 20 seats, the next 10 rows have 22 seats, and the other rows have 26 seats.
A new movie is scheduled for screening. It will be screened for the next two weeks,
three times each day (4:40 p.m., 6:30 p.m., and 8:30 p.m.). The shows have to be added to
the system. All shows run in theater A.
Exercise 13.5 Play through these scenarios. Note on a separate piece of paper all the
questions you have left unanswered. Make a record of all scenarios you have played through.
Exercise 13.6 What other scenarios can you think of? Write them down, and then play
them out.
Playing through scenarios takes some patience and some practice. It is important to spend
enough time doing this. Playing through the scenarios mentioned here will take several hours.
It is very common for beginners to take shortcuts and not question and record every detail about
the execution of a scenario. This is dangerous! We will soon move on to developing this system
in Java, and if details are left unanswered, it is very likely that ad hoc decisions will be made at
implementation time that will later turn out to be bad choices.
It is also common for beginners to forget some scenarios. Forgetting to think through a part
of the system before starting the class design and implementation can cause a large amount of
work later, when an already partially implemented system would have to be changed.
Doing this activity well, carefully stepping through all necessary steps, and recording steps in
sufficient detail takes some practice and a lot of discipline. This exercise is harder than it looks
and more important than you realize.
Search WWH ::

Custom Search