Home arrow Practices arrow Page 3 - Class and Object Diagrams

Design-Level Class Diagrams - Practices

This article will teach you about UML structural diagrams, used to help you keep track of the structure of your models. It was excerpted from chapter three of Fast Track UML 2.0, written by Kendall Scott (Apress, 2004; ISBN: 1590593200).

  1. Class and Object Diagrams
  2. Analysis-Level Class Diagrams
  3. Design-Level Class Diagrams
  4. Object Diagrams
By: Apress Publishing
Rating: starstarstarstarstar / 27
July 14, 2005

print this article



Once a project starts exploring design issues, class diagrams tend to be more varied. You can expand your classes using the full UML notation, or you can explore classes at a lower level of abstraction and continue to suppress the details (perhaps because those details are well-defined elsewhere).

One form of design-level class diagram is simply a more expansive version of an analysis-level diagram. Figure 3-3 expands the analysis-level class diagram of Figure 3-2 to show operations.

Figure 3-4 delves into some of the design-level classes that are connected with the ShoppingCart class that appears in Figure 3-1.

The new ShoppingCart class is an HTML page that contains a static form displaying the contents of the cart and a Java applet that allows the Customer to make changes to the contents of the cart. The CandidateOrder is a JavaServer Page that retrieves the essential information from the ShoppingCart page (the client) and stores the information on a server in a format suitable for further processing by the system. SShoppingCart is an Enterprise JavaBean that lives only until the Customer is done with his or her shopping cart, at which point the system creates a “persistent” EJB with the name EOrder; this is the form that the Customer’s order takes going forward.

Figure 3-5 takes things another step closer to implementation by showing the classes that sit underneath the ShoppingCart class shown in Figure 3-4.

Figure 3-3Expansion of analysis-level class diagram

Figure 3-4High-level design class diagram

Figure 3-5Low-level design class diagram 

The elements of Figure 3-5 are as follows:

  • Remote is the superclass of all interfaces through which clients have remote access to EJBs.

  • EnterpriseBean is the superclass of EntityBean (not shown) and SessionBean.

  • EJBHome defines operations such as create and remove for an EJB.

  • EJBObject defines operations for accessing an EJB’s data.

  • ShoppingCartIF contains the user-defined operations for our EJB.

  • SessionBean is a form of EJB that lives only while the system’s session with the client is alive.

  • ShoppingCartHome is the interface to the “factory” that creates instances of our EJB.

  • ShoppingCart is the interface to our EJB. It offers the operations defined by both EJBObject and ShoppingCartIF, via multiple inheritance (see the section “Generalization” in Chapter 2).

  • ShoppingCartBean implements the operations that ShoppingCartIF offers.

Figure 3-5, which is adapted from a diagram in The Art of Objects,3 can serve as a diagram of a pattern in that everywhere ShoppingCart appears, you can simply plug in the name of another design-level class that involves EJBs. One idea, then, is to replace ShoppingCart with a generic class name and then refer to the resulting diagram from various other diagrams as appropriate.

>>> More Practices Articles          >>> More By Apress Publishing

blog comments powered by Disqus
escort Bursa Bursa escort Antalya eskort


- Calculating Development Project Costs
- More Techniques for Finding Things
- Finding Things
- Finishing the System`s Outlines
- The System in So Many Words
- Basic Data Types and Calculations
- What`s the Address? Pointers
- Design with ArgoUML
- Pragmatic Guidelines: Diagrams That Work
- Five-Step UML: OOAD for Short Attention Span...
- Five-Step UML: OOAD for Short Attention Span...
- Introducing UML: Object-Oriented Analysis an...
- Class and Object Diagrams
- Class Relationships
- Classes

Developer Shed Affiliates


Dev Shed Tutorial Topics: