advertisement

Search Tips
Articles  |   Tutorials  |   Reviews  |   Dev Tools  |   by Category  |   by Date  |   by Name  |   Submit  |   Source Code  |  

Browse DevX
DevX Updates - Sign Up Here


Partners & Affiliates












advertisement

Articles : Advanced Topics in Java :
Unified Modeling Language :

Contents
Classes and Inheritance
Associations
Roles
Attributes and Behaviors
Abstract Classes, Interfaces, and Relationships
Conclusion

Associations and Roles

Associations

Relationships provide a pathway for communication between objects. Sequence and/or collaboration diagrams are examined to determine what links between objects need to exist to accomplish the behavior. If two objects need to talk there must be a link between them.

Classes relate to each other. In the first modeling stages (analysis), we are interested primarily in these associations and may choose to name them to clarify the meaning of such an association (the names appear in italics). The association names will usually be verbs:

Most of the associations will have a direction and navigability. The above association points from Class1 to Class2. You can think of the direction as "who can see whom", i.e. Class1 can see - or access - Class2 but not the other way around.

If the association has no arrows, it means either that we don't know about the accessibility yet or that both classes see each other (as if there were arrows on both ends of the association):

The name of the association has no effect on the code - it only documents the diagrams.

The simplest and most common superclass-subclass relation is a "generalize" relation and is denoted as a line with a hollow arrow:

The same relation can be also drawn as an inheritance tree:

NEXT


The author has over three and a half years of experience on developing web and object oriented application with a development focus on server side and enterprise Java .He is a regular writer for the European publication "Programmez!" and writes on and of for some online publications. He can be reached at sameertyagi@usa.net

How to Add Java Applets to Your Site

New on the Java Boutique:

New Review:

Time Management Made Easy with the Quartz Enterprise Job Scheduler
Why not just use the Java timer API? This open source scheduling API boasts simplicity, ease-of-integration, a well-rounded feature set, and it's free!

New Applet:

Reverse Complement
Reverse Complement is a simple applet that converts DNA or RNA sequences into three useful formats.

Elsewhere on internet.com:

WebDeveloper Java
Lots of Java information on webdeveloper.com

WDVL Java
Thorough Java resource at the Web Developer's Virtual Library.

ScriptSearch Java
Hundreds of free Java code files to download.

jGuru: Your View of the Java Universe
Customizable portal with online training, FAQs, regular news updates, and tutorials.

internet.com logo


JavaBytes
Internet Cyclone
This powerful, easy-to-use, internet optimizer is for Windows 95, 98, ME, NT, 2000 and XP. It's designed to automatically optimize your Windows settings, boosting your Internet connection up to 200%.
Blackmail Applet
This applet prints out text that looks like letters cut out of a newspaper. You can specify the text, the width and height of the applet and the delay after each letter. Future versions will have more parameters.
JB User Poll
What is your primary tool for learning Java?
The JavaBoutique Top 15:
1. articles.rdf
2. applets.rdf
3. RushHour
4. Othello
5. linx
6. Little_Wizard
7. AScroll2
8. Froz_Bubb
9.
10. quickserv
11. Birdbrain
12. PacMan
13. DS_Snow
14. AnimLetters_anim
15. Boulderdash
Want more? Check out our Top 100!

Refer-It
Affiliate Program and Referral Directory.
New on internet.com
Google IM Not Talking to Other Jabbers
Newly-launched Google Talk IM service doesn't connect to other open source Jabber servers and users -- at least not yet.

Printer Sets Good Example for Small Business Security
While surveys suggest that small businesses aren't prepared for ever-present security dangers, this Boston-area printer has maintained a pristine operation since a scare six years ago.

VoIP Gizmo Comes to Universities
As student gear up for back to school, a SIP-based initiative aims to VoIP-enable universities around the world for free calling.



Copyright 2002 INT Media Group, Incorporated. All Rights Reserved.
Legal Notices,  Licensing, Reprints, & Permissions,  Privacy Policy.
http://www.internet.com/