CS 4448 - Spring 1998
Object-Oriented Programming and Design
Homework #1
Due on Tuesday, January 20 at the start of class.
Question 1:
- Smalltalk says there is one root in the
inheritance hierarchy while C++ does not. What are the pros and cons
of these two strategies? What types of designs and frameworks do you
think would require C++ to enforce a single root in the inheritance
hierarchy?
Question 2:
- In English give a detailed description, from ordering to final
delivery, of the tasks that need to
be performed in order to sending flowers to someone far
away. In the first paragraph describe the process using an
imperative(procedural) paradigm. In the second paragraph use an object
oriented paradigm which should involve methods(messages) and
objects(agents).
Simple ATM Design Description
- We should all be familiar with an ATM machine. A client
approaches the ATM and inserts the card into the ATM-Card reader. The client
then enters a pin number on the keypad. The pin number and account number is
then checked with the bank. If the information is valid then the client
can and will request some funds. The ATM checks with the bank to see if the
funds are available. If they are then the client is given
the money and the account balance reflects the transaction and a receipt
is printed for the clients records. The client is then returned the card.
- The description is of a simple ATM without deposits and additional
features.
Question 3:
- Use the ATM description to create a Module Diagram.
Question 4:
- Use the ATM description to create a State Transition Diagram.
Question 5:
- Use the ATM description to create an Interaction Diagram.
Bonus:
- Stop! What is your name?
- What is your quest?
- What is your favorite color?
- What is the air-speed velocity of an unladen swallow?
Adam Jonathan Griff,
computer@griffmonster.com
Copyright © University of Colorado. All rights reserved.
Revised: January 15, 1998