Practices
  Home arrow Practices arrow Page 3 - Class and Object Diagrams
Dev Shed Forums  
Administration  
AJAX  
Apache  
BrainDump  
DHTML  
Flash  
Java  
JavaScript  
Multimedia  
MySQL  
Oracle  
Perl  
PHP  
Practices  
Python  
Reviews  
Security  
Smartphone Development  
Style-Sheets  
Web Services  
XML  
Zend  
Zope  
Mobile Linux  
App Generation ROI  
IBM® developerWorks  
Forums Sitemap  
E-Commerce Hosting  
Linux Web Hosting  
Managed Hosting  
Small Business Hosting  
VPS Hosting  
Weekly Newsletter

 
Developer Updates  
Free Website Content 
 RSS  Articles
 RSS  Forums
 RSS  All Feeds
Write For Us Get Paid  
Request Media Kit
Contact Us  
Site Map  
Privacy Policy  
Support  
 USERNAME
 
 PASSWORD
 
 
  >>> SIGN UP!  
  Lost Password? 
Google.com  
PRACTICES

Class and Object Diagrams
By: Apress Publishing
  • Search For More Articles!
  • Disclaimer
  • Author Terms
  • Rating: starstarstarstarstar / 14
    2005-07-14


    Table of Contents:
  • Class and Object Diagrams
  • Analysis-Level Class Diagrams
  • Design-Level Class Diagrams
  • Object Diagrams

  • Rate this Article: Poor Best 
      ADD THIS ARTICLE TO:
      error-file:tidyout.log Del.ici.ous error-file:tidyout.log Digg
      error-file:tidyout.log Blink error-file:tidyout.log Simpy
      error-file:tidyout.log Google error-file:tidyout.log Spurl
      error-file:tidyout.log Y! MyWeb error-file:tidyout.log Furl
    Email Me Similar Content When Posted
    Add Developer Shed Article Feed To Your Site
    Email Article To Friend
    Print Version Of Article
    PDF Version Of Article

     
     
    ADVERTISEMENT


    Class and Object Diagrams - Design-Level Class Diagrams
    ( Page 3 of 4 )

    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
     

       

    PRACTICES ARTICLES

    - 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
    - Basic Ideas





    © 2003-2009 by Developer Shed. All rights reserved. DS Cluster 6 Hosted by Hostway
    For more Enterprise Application Development news, visit eWeek