Info2 WS 2018/19

Website of Prof. Dr. Barne Kleinen, Professor for Media Informatics (Bachelor/Master) at HTW Berlin

Info2: Exercise 02: Implementing CRC Cards

     <prev next>

Pre-Lab

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.

  1. This exercise builds on the design you did last week using CRC cards.
  2. What properties should a data structure have that can model movie theater seats?
  3. 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?

Assignment

These are the required exercises for this week. We are going to see if we can get our minds back into Java-Mode. Work in groups of 2-3 people, all of you hand in the same report. Remember to put all of your names on the report. You can continue to use BlueJ, or move to Eclipse, if you wish.

  1. If you didn’t do Lab 01 together, decide which of your cinema booking systems you are going to use. If necessary, flip a coin. Why did you choose the one you did?
  2. Implement a prototype of your cinema booking system. 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. We are just making prototypes!
  3. Did 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?
  4. Tooling: Using Packages in Eclipse If you have used Eclipse, make sure that all your code is within one or two or more neatly named packages, and you have at least one unit test. If you haven’t used Eclipse, introduce at least one package either to last week’s project or a new project.

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 your 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?

Lab Report / What to turn in

Your report is due the day before your next lab (for exact times, please refer to moodle). Submit both a lab report as pdf and your whole source code directory as a zip.

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 on top of the first page, summarize what you learned, and note the time you invested in this exercise. Both of you need to upload the same report in PDF format to Moodle before the deadline.

Special Questions for your report

How many lines of code did you write for each class? Record this statistic in your report.