CS 4448 - Spring 1998
Object-Oriented Programming and Design
Homework #7

Due on Tuesday, March 17 at the start of class.

You must print out your diagrams, your code, and a representative output test suit of your TripleCalculator. Also email me the code.

Design a TripleCalculator and derive it from Calculator

Use the Calculator described in HW#5 and implemented in HW#6

You need to create a design for TripleCalculator to show how it works. Show the class diagram of the TripleCalculator which must be derived from Calculator. For this assignment do an interaction diagram with a good test case. I will assume that all the details have already been turned in for Calculator. So your design must give a VERY detailed description of the TripleCalculator. You can show the design for your Triple class which must be enhanced. When you follow the design and required methods below you will have a TripleCalculator. This calculator will NEVER have anything but a Triple in its memory or screen. If this is not the case contact me before you turn in your assignment so we can figure out if it is your oversight/loophole or mine.

Comments

I have good news and hints for you. About half of you will not and should not change any code in your Calculator, Memory, and Screen. Some of you will need to modify your Calculator since it can not handle this assignment but keep in mind that if your design was like the ones we came up with in class as good designs you will only need to add and override the methods I mentioned. The ">" method has is being defined for use in the exceeds: method. So make sure you implemented exceeds: in Calculator using ">".
Adam Jonathan Griff, computer@griffmonster.com
Copyright © University of Colorado. All rights reserved.
Revised: March 16, 1998