The
All of the models are contained in a package called estore. This package contains two subpackages: business and gui:
Note that the gui package depends on the business package as well as two packages imported from the Java class library.
There are no other dependencies.
The business package contains five classes:
The gui package contains two classes and uses classes imported from other packages:
During a particular online shopping session a cart contains two DVD recordings of the movie The Matrix ($15.35 each), and a copy of the book UML Distilled ($22.40).
A scenario talks about specifics: a specific cart, a specific book, a specific DVD. These are not new classes, rather they are instances of existing classes in our business package.
We create a class diagram in a separate package (called scenario1). But this diagram contains objects and links.
The objects are instances of the classes in the business package. The links are instances of associations in the business package.
The scenario does not mention the names of the objects nor the ID numbers of items or descriptions. For demonstration purposes we will make these up.
The StarUML code generator does a pretty bad job of generating code from diagrams:
How could this code be improved?
Here's a screen shot of the estore project in StarUML. Note the tree-structure in the Model Explorer view: