2008 Exam answers

From CSSEMediaWiki
Revision as of 00:14, 17 July 2009 by Aidan Bebbington (Talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

Question 1

Possible improvements to the design:

  • Replace the Pair class with a Transaction class and two subclasses CreditTransaction and DebitTransaction. These classes will contain the information that was contained in Pair, and any other behavior related to transactions which is likely to have leaked out into the rest of the system.
    • Violations: name unknown; something related to a class capturing behavior as well as holding data
Personal tools