Creating a text UML document

UML class design documents follow a standard format. While text files are limited for showing relationships between classes, they can be adequate for capturing the details of a single class and can be easily stored within your Java project in Eclipse.

ClassName
---------------------
+/- for public or private, variableName : data type
ex:
+ name : String
(read as public, variable named name of type String)
---------------------
+/- for public or private, methodName( argument name : argument type ) : return type
ex:
+ doCalc(numberOfTerms : int ) : double
(read as public, method named doCalc, argument numberOfTerms of type int, return type double

Static variables and methods are underlined in UML, when text formatting you can start and end the variable name with underscores, such as _variableName_.

Combined Example

The above examples, combined, would produce the following UML class description:

ClassName
---------------------
+ name : String
---------------------
+ doCalc(numberOfTerms : int ) : double