CS 4448 - Fall 1998
Object-Oriented Programming and Design
Homework #1
Due on Monday, August 31 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 of how a user interacts
with an ATM machine in order to make a withdrawal. Start with the
client approaching the ATM machine
and finish with the client leaving with some money. You should include the
user(keypads, bankcard, etc.), the
local(ATM machine) and remote(Bank Computer) hardware.
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 Flower Delivery Design Description
- We have a sender, local and remote florists, and
recipient. The sender will send a message to the local florist
requesting flowers be sent to a recipient. The local florist then
turns around and sends a message to the remote florist with the same
request. The remote florist may then locate the recipient using a
locate object with a find method. The remote florist then delivers the
flowers to the recipient.
Question 3:
- Use the Flower Delivery description to create a Module Diagram.
Question 4:
- Use the Flower Delivery description to create a State Transition Diagram.
Question 5:
- Use the Flower Delivery description to create an Interaction Diagram.
Adam Jonathan Griff,
computer@griffmonster.com
Copyright © University of Colorado. All rights reserved.
Revised: August 24, 1998