Exercise 4: Refactoring (Due: Jul 18th, 2011)
SE2-Software Design & Architecture (CS446/CS646/ECE452) Spring 2011

Main|Schedule|Term Project

Exercise

Provide examples for the following refactoring techniques as described at SourceMaking. You can use UML diagrams (class) or write pseudo code for your examples. Keep you answers short. You are allowed to use the examples from the website as long as you clearly state that in your submission.
  1. Move Method
  2. Extract Class
  3. Duplicate Observed Data
  4. Replace Subclass with Fields
  5. Replace Conditional with Polymorphism
  6. Decompose Conditional
  7. Encapsulate Downcast
  8. Extract Subclass
  9. Extract Interface
  10. Form Template Method

You are allowed to work on this with other students, however each student must submit his/her own solution.

Submission

Submit the solution in a PDF file. Use UWACE to send your solution file. This exercise will expire on Jul 20th, 2011.


Last updated on Jul 11th, 2011 by Atif Khan.