Euphrates Design Model

Euphrates is an online store (estore) similar to Amazon.

Euphrates customers add books and DVDs to a cart, then checkout.

Euphrates will be implemented in Java.

The Euphrates design model was developed using StarUML. The models can be found in estore.uml.

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

The business package contains five classes:

The gui Package

The gui package contains two classes and uses classes imported from other packages:

A Scenario

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.

 

Implementation

The StarUML code generator does a pretty bad job of generating code from diagrams:

business

gui

How could this code be improved?

StarUML

Here's a screen shot of the estore project in StarUML. Note the tree-structure in the Model Explorer view: