1 / 9

UML to Code

UML to Code. by Brian Lawler Brian.Lawler@JHU.edu. <<Component>> MyComponent. <<Interface>> FirstInterface. void OperationA () int OperationB () float OperationC (int input). void OperationA () int OperationB (). <<Interface>> SecondInterface. Class Structure and Interfaces to Code.

mdykes
Download Presentation

UML to Code

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. UML to Code by Brian Lawler Brian.Lawler@JHU.edu

  2. <<Component>>MyComponent <<Interface>>FirstInterface void OperationA ()int OperationB ()float OperationC (int input) void OperationA ()int OperationB () <<Interface>>SecondInterface Class Structure and Interfaces to Code Interface FirstInterface { void OperationA(); int OperationB(); } Interface SecondInterface { float OperationC(int input); } Class MyComponent implements FirstInterface, SecondInterface { void OperationA () { // Implementation ... } int OperationB () { // Implementation ... return someInt; } float OperationC (int input) { // Implementation ... return someFloat; } } float OperationC (int input) Brian.Lawler@JHU.edu

  3. Checkout Session ... Add (Code : int, Number of Items Purchased : int ) :Price... Classes Operations to Code Class CheckoutSession { ... Price Add (int Code, int NumberOfItemsPurchased) { // Implementation ... return aPrice; } ... } Note: Order of variable and variable type. Collapse of spaces in names. Brian.Lawler@JHU.edu

  4. Network B: H: G: E: D: C: G: F: H: A: B: C: F: D: E: A: Time Model Scale Down to Code C: OpA () : int OpD ( int OpA () { ... return i; } OpA () :int Op () : void Op () : void Brian.Lawler@JHU.edu

  5. Code to Multiple Languages <<Entity>>Transaction <<Component>>Transaction {type=SQL} <<Component>>Transaction {type=Java} <<Component>>Transaction {type=XML} <<Component>>Transaction {type=C++} Brian.Lawler@JHU.edu

  6. State Diagrams to Code SystemPackage::ProjectPackage::PersonClass Hired Fired Un-Employed Employed Hired Retired Note: See UML User Guide for example. Brian.Lawler@JHU.edu

  7. Sequence Diagrams to Code Note: See UML Distilled for example. Brian.Lawler@JHU.edu

  8. Constraints and OCL to Code Brian.Lawler@JHU.edu

  9. Tools with Forward/Reverse Engineering • IBM Rational Software Architect™ • IBM Rational Rose™ • Borland Together™ • Telelogic System Architect (?) • Altova UModel • Visio Enterprise/2007 • BlueJ – www.BlueJ.org • See also: • http://uml-directory.omg.org/ • http://del.icio.us/brianlawler/UML+Tools Brian.Lawler@JHU.edu

More Related