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.
- Move Method
- Extract Class
- Duplicate Observed Data
- Replace Subclass with Fields
- Replace Conditional with Polymorphism
- Decompose Conditional
- Encapsulate Downcast
- Extract Subclass
- Extract Interface
- 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.