HTW Berlin Medieninformatik

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


Exercise 2: Implementing CRC Cards

Finger Exercises

Please think through the following questions before coming to the lab. Write down your answers and bring them with you for pre-lab check-in. You will get your CRC cards back in class.

  1. What properties should a data structure have that can model movie theater seats?
  2. Given an n x m matrix and a cell c in (r, c). How do I reference the neighboring cells in the same row? In the same column? How do I reference the diagonal cells?

 


Lab exercises:

These are the required exercises for this week. Work in groups of two, each of you hands in the same report. Remember to put your names on the report. You can continue to use BlueJ, or move to Eclipse, if you wish.

  1. Implement your cinema booking system from exercise 0. You should be able to reserve n neighboring seats, calculate the total price for this reservation, delete a booking, and print out a seating plan that shows which seats are available. Don't worry about making it beautiful - it is enough for it to work. Make a prototype!
  2. Do you end up using all of the classes you specified? Did you miss any classes? Discuss in your report! How did you test your system?

For the bored:

  1. Sometimes people want special kinds of seats. The last two rows have loveseats, that is, two seats are connected with no armrest between them. Now offer you customers the possibility of reserving a loveseat, or a seat near an aisle or one in the middle. How will you define these conditions?
  2. Assume your theater is very large and is divided into sections, each accessable by an aisle. How do you have to adjust your seating plan and your conditions - is this hard or easy to do?

Your report is due by 11.00 pm the night before your next lab! As in Informatics 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 any collaborators, summarize what you learned, and note the time you invested in this exercise. How many lines of code did you write for each exercise? Record this in your report.


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