Yuml is a free web service that draws UML class diagrams given a Yuml input specification. As this is a for-profit company, the "free" service comes with some strings attached. Namely, it will produce a pretty class diagram for you provided that your specification is not too complicated. (I found other problems with Yuml, but this is a story for another day).
A Yuml specification is elegant. Here is a BNF of (a subset) of Yuml that we will use:
YumlSpec : Line+ ; // one or more lines
Line: Box | Connection ;
Box : '[' Class ']' ;
Connection : BoxName [End1] [Role1] DashType [Role2] [End2] BoxName ;
DashType : '-' // solid line
| '-.-' // dashed line
End1 : '<>' | '++' | '^' | '<' ; // aggregation, composition, inheritance, arrow
End2 : '<>' | '++' | '^' | '>' ; // aggregation, composition, inheritance, arrow
Role1 : String ; // String that has no ']' chars
Class : Name // name only
| Name '|' String // name and methods only
| Name '|' String '|' String // name, fields, and methods
BoxName : '[' String ']' // class name
| '[ Interface;' String ']' // interface name
Note that a "String" token is mentioned
above. Well, this String isn't any Java String, but one that
is devoid of the characters: "," comma, "[" (left brace), "]"
(right brace), "<" (less than), ">" (greater than), "-"
(minus). Further, a semicolon ";" means new line.
So, the following Yuml specification (a sentence in the above language):
Will produce this pretty class diagram:
Please do not read the above specification too deeply! "Interface;Closable" is a String. The word "Interface" means nothing to Yuml. It could just as well have been "George" (which also means nothing to Yuml). What Yuml does understand is ";" (semicolon), which means add a new line. So "Interface;Closable" produces a 2-line name in the above figure. And the string "bind();getLocalAdddress()" means print strings "bind()" and "getLocalAddress()" on separate lines.
Note: Here is a
challenge of this project: You should observe that a BC database
associations, although it does contain "extends class" links and
interface" links. You are to deduce from the data in a BC
database what association links are present among classes of the given
Yuml documentation, as it exists on-line, is not exactly accurate, especially w.r.t. interfaces. Limit yourself to the grammar above.
Remember that you may not be able to get a Yuml figure produced (although I have produced a Yuml file for each program I want you to analyze below), even though your specification may be correct. If you can't produce a figure, that's OK. Just tell me and submit your a Yuml specification. However, please note that if you have problems, it might be your specification, not Yuml itself.
> cat bc.schema.pl bcDatabase.pl > vm2tInput.pl
> java MDELite.vm2t.Main vm2tInput.pl bc2yuml.vm
A critical part of any design is clarity and understandability. Hence, you will be graded on the clarity of your project and its ability to work correctly. Sloppy code, documentation, or anything that makes grading or understanding your program difficult will cost you points. Beware, some of these "beauty" points are subjective.
No late assignments/submissions will be accepted.