| 88-271 Homepage | |
88-271 Homework #5 Sample SolutionThis UML Class Diagram reflects a likely set of classes that might be chosen if the process described in the Homework #2 scenario were to be automated. Things like the Cashier, Customer, Scale, Queue, Door, etc. would not be objects in such a system because even though they are physically present, their identity as data objects is uninteresting. That is to say, some scale must be used to weigh the envelope, and some person must use the scale to weigh the envelope, but which scale and person actually does the job is completely irrelevant to the process described. If a convicted fellon named Bubba weighs the envelope, or if the President of Zimbabwe weighs the envelope, the resulting transaction is still exactly the same as if an ordinary postal clerk had done it. So it isn't important to keep track of the identity of the cashier. Likewise cases can be made for the other objects: anyone can mail an envelope, even if they don't live at the return address. All that matters is that they pay for the transaction. So the Customer would not really be an interesting object, either. However, since we did not specify that your Class Diagram should reflect a model that is fit for any particular type of implementation, there is no real way to evaluate the quality of it. Hopefully the project should give you all some better intuition of this.
| |