HTW Berlin Medieninformatik

HTW Berlin
Fachbereich 4
Internationaler Studiengang
Internationale Medieninformatik (Bachelor)
Info 2: Informatik II
Winter Term 2009/10


Exercise 0 : CRC Cards

This exercise can be done in larger groups - there shoud be at least 2 persons in each group, and a maximum of 5. You will need lots of paper and pens and some cards - I have a lot available. You can go outside to do this, if the weather permits.

We are going to assume that there have been several meetings with the operators of a cinema who want to have a system to handle the bookings of seats for their movie screenings. The operators have described the expected functionality, but we won't be concerned with how that happens, this is called Requirements Engineering and will be discussed next semester in Software Engineering. Assume that this is the description written (adapted from Barnes/Kölling):

The cinema booking system should store seat bookings for multiple theaters. Each theater has seats arranged in rows. There can be a different number of seats in every row. Customers can reserve seats, and are given a row number and a seat number. They may request bookings of several adjoining seats. Each booking is for a particular show (that is, the screening of a given movie at a certain time). Shows are at an assigned date, time, and price, and are scheduled in a theater where they are screened. The system stores the customer's name and telephone number. The customer is told what the booking will cost when the tickets are picked up.

  1. The first step is to discover some candidate classes and methods. Use the Booch method to determine candidate classes and methods, and write them down.
  2. Make CRC cards for each of your candidate classes. Only put down the class names for now.
  3. The first scenario that we will be doing is a reservation:

    Jane Doe calls the cinema and want to make a reservation for two seats to watch Inglorious Basterds at 8 pm. The cinema employee starts using the booking system to find and reserve a seat.

    Jane is interacting with the booking system, which will probably be represented by a class such as CinemaBookingSystem. Using the CRC cards, play through the scenario. How does the system find the show? As you discover responsibilites and collaborators, write them down on the cards. Assume there are plenty of free seats. Jane will choose seats 13 and 14 from row 12. The reservation is now made. How is this done, exactly? What data is going to have to be stored? Where? If you feel the need to create a new class, feel free to do so! If you discover that a class needs to be split in two - make two new cards and rip up the old one. If two need to be merged, do so. Keep a list of things you want to keep track of on a separate piece of paper.
  4. Choose another scenario and play this through. If you have time, do more! You will submit your final CRC cards and a description of the process you went through, in complete sentences. Here are some suggestions for possible scenarios:
    1. Jane has a booking and needs another two, adjoining seats.
    2. Mary wants to book 4 seats together, but there are not 4 adjoining seats available.
    3. Joseph wants to book, but there are no seats available.
    4. Otto has a booking he wants to cancel.

Your printed report and the CRC cards for the group are due at the start of your next lab! As in Informatik 1, I am more interested in process than in product, although we are now getting more interested in products as well. Your report should include the names of all persons in the group, and include a summary of what each of you have learned, and note the total time each of you invested in this exercise.

 


Copyright 2009 Prof. Dr. Debora Weber-Wulff
Questions or comments: <weberwu@htw-berlin.de>
Some rights reserved. - Copyright and Warranty