Sales Order System

association -- a relationship between instances of the two classes. There is an association between two classes if an instance of one class must know about the other in order to perform its work. In a diagram, an association is a link connecting two classes.

aggregation -- an association in which one class belongs to a collection. An aggregation has a diamond end pointing to the part containing the whole. In our diagram, Order has a collection of OrderDetails.

generalization -- an inheritance link indicating one class is a superclass of the other. A generalization has a triangle pointing to the superclass. Payment is a superclass of Cash, Check, and Credit.

A Class diagram gives an overview of a system by showing its classes and the relationships among them. Class diagrams are static -- they display what interacts but not what happens when they do interact.

The class diagram below models a customer order from a retail catalog. The central class is the Order. Associated with it are the Customer making the purchase and the Payment. A Payment is one of four kinds: CashCheck, Credit or Wire Transfer. The order contains OrderDetails (line items), each with its associated Item.

Import into your Project

Posted by: Brittany Shook

Turn every software project into a successful one.

Try Visual Paradigm for Free! Or learn more about our features.

Leave a Reply

1 Comment on "Sales Order System"

avatar
newest oldest most voted
Jarek Zelinski
Guest

This diagram shows mixed some terms and (maybe) part of code, but it is not a proper object architecture PIM model. Object paradigm says: objects are using other objects, it is mean: in architecture model we generally use “dependecy”, not associacions on the class dagrams. About aggregation: see UML v.2.5, now we use composition not agregarion.