Homework 2: Test driven design, Extreme Programming and Class Design


To Deliver: email your answers to the questions stated in the text below to the grader 

To Download: 

Due date for submission:    September 20, at noon (12.00 PM)

Drop out date:                     September 23, at noon (12.00 PM)


Test driven design

We discussed test driven design in class. To see how this works in practice for experience developers, you can find an episode described at http://www.objectmentor.com/resources/articles/xpepisode.htm. In order to demonstrate XP (eXtreme Programming) practices, Bob Koss (RSK) and Bob Martin (RCM) perform pair programming for a simple application that calculates bowling scores. They use test first design and a lot of refactoring to create their application.  


Please read through the text and find answers to the following questions:

  1. What are the different stages in their development process? 
  2. Do they go through those stages once, twice, multiple times and why is that so?
  3. How can you recognize that they make progress? 
  4. Their tests serve multiple purposes. What are those?
  5. What is the purpose of changes to code that they call "refactoring" and how is that achieved?



Object oriented class design

We discussed object oriented design and ways to describe a software design by way of CRC cards and UML diagrams. 

To see a sufficiently large OO design in action, you are asked to check the Java collections framework webpage, which provides rich access to API, a tutorial and further information. 


Please explore the Java collections framework and find answers to the following questions:

  1. Why are there interfaces like Set or List and not just classes that implement particular data structures?
  2. What is the reason to have multiple general-purpose implementations like HashSet and LinkedList?
  3. What is an Abstract Implementation and what can you do with it?




What to submit:

By email to the grader: Notes on your particular findings / answers. 


Grading

You will receive points for each reasonable answer to questions 1-8.