This is the staging environment running on https://bkleinen.github.io/staging/
This site contains unpublished changes.
- please visit the production website at https://home.htw-berlin.de/~kleinen/ instead!
 

B7 Informatik 2 Summer 2025

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

Lab 01: Implementing CRC Cards

    

Learning Goals

After this lab you should be able to agree with each of the following statements. This looks like a lot, but it is all repetition from what you learned in Info1. Ideally you agree with each statement even before starting the lab.

I remember programming concepts concerning classes and objects:

  • I know the difference between classes and objects.
  • I can instantiate an object.

I remember programming concepts concerning fields and variable types:

  • I can add fields to a class.
  • I can manage modification of fields with mutator(setter) methods.
  • I can manage reading of fields with accessor(getter) methods.
  • I can use collections for storing elements.
  • I am familiar with the idea of a map.

I remember programming concepts concerning methods:

  • I can define the return type of a method.
  • I can set the visibility modifier of a method.
  • I can add parameters to a method signature.
  • I can call methods of objects.
  • I can call static methods of classes.

I remember concepts concerning program design:

  • I use separate classes for separate concerns.
  • I can abstract from concrete scenarios.
  • I can apply modularization, creating classes that can be reused in various scenarios.
  • I have a strategy for refactoring given code to make it fit new needs.

Pre-Lab

This exercise builds on the design you did last week using CRC cards. In Summer 2025 we did this in the lecture using this material page. Please think through the following questions together with your team before coming to the lab and write down your answers somewhere.

P1. Prepare a prioritized subset of features that you would like to implement.

P2. Prepare a repository either on github or gitlab which is private (not publicly visible):

  • On GitHub, you need to register as a student/in the educational program to get free access to private repositories.
  • Instructions for GitLab will follow.

You will only need to implement a part of the requested features (the bored may do all if they wish).

Assignment

  1. Compare and Discuss your CRC Cards with other teams during the Lab.

  2. Implement 2-3 features you prepared with CRC Cards in the lecture.

  3. You may team up with other teams to implement parts of the whole feature set together, which will require agreement on the design and some communication about the exact interfaces (method signatures) of shared classes.

  4. Make sure that all your code is within one or two or more neatly named packages and you have at least one unit test.

  5. Answer the following questions: Did you end up using all of the classes you specified? Did you miss any classes? Discuss!

Lab Report / What to turn in

All info on the lab reports can be found on the Labs page.

For this lab, you need to hand in

  • a lab report in pdf
  • the link to your git repository as plain text