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

B15 Informatik 3 (Info3)

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

Exercise 10 - Legacy Code - Refactoring to Patterns - Part 2

     <prev next>

The Gilded Rose A Gilded Rose, Foto by Kelton

Assignment: Gilded Rose Refactoring and Enhancement

Refactor the Gilded Rose and add the requested new functionality.

Last week, you’ve developed characterization tests for the guilded rose. Secured by that, you’re now safe to refactor the given implementation to a good object-oriented design - but don’t forget the goblin in the corner!

That is, you can’t simply create an Item-Hierarchy where each item knows how to update it’s quality. You have to find another solution without touching the Item-Class.