Presentation is loading. Please wait.

Presentation is loading. Please wait.

The Unified Modeling Language

Similar presentations


Presentation on theme: "The Unified Modeling Language"— Presentation transcript:

1 The Unified Modeling Language
(UML) References: Jacquie Barker,Beginning Java Objects; Martin Fowler,UML Distilled, 5/12/2019

2 UML Programming is like building a house. An architect creates a design, and a builder uses appropriate tools to carry out the design. The builder does not proceed without a blueprint from the architect. Software developers also need a blueprint to create complex systems. The UML is a toolbox of graphical notations used to produce the blueprint -- a graphical depiction of the software design 5/12/2019

3 UML Many Object technologists were influential contributors to UML:
James Rumbaugh : the Object Modeling Technique (OMT) Grady Booch : the Booch Method (clouds) Sally Schlaer and Stephen Mellor : state diagrams, recursive design approach Rebecca Wirfs-Brock : Responsibility driven design Beck and Cunningham: CRC cards Bertrand Meyer : Eiffel and ‘programming by contract’ 5/12/2019

4 UML Many Object technologists were influential contributors to UML:
Ivar Jacobsen : use cases for formalizing requirements James Martin and James Odell : books on Information Engineering Peter Coad and Edward Yourdon: lightweight, prototype-oriented approach to methods Derek Coleman (HP) : the Fusion method Erich Gamma, Richard Helm, Ralph Johnson, John Vlissides – “the Gang of Four” : Design Patterns 5/12/2019

5 UML Experts in object technology argued for years over notations and process. Software developers could choose from many different methodologies to express their designs; there was no standard means of communication. UML was the outcome of the “methodology wars”. 5/12/2019

6 UML Jacobsen, Rumbaugh and Booch - dubbed “The Three Amigos” - joined their competing modeling languages into one to create a standard notation (i.e. common vocabulary) that developers can use to convey their designs. UML was adopted as the standard for the OMG (Object Management Group) – a consortium that includes over 800 members– in 1997 5/12/2019

7 UML UML is not a method. It does not outline a procedure for designing software; it is a modeling language that captures the design graphically. Most methodologies consist of a modeling language and a process Whatever process you use, you can use UML to record the results of your analysis and design decisions. Diagrams emerge independent of some process. 5/12/2019

8 UML The main reason to use UML notation is communication.
To discuss design with someone, both need to understand the modeling language, not the process used to come up with the design. Human language is imprecise Code is too detailed 5/12/2019

9 UML Class Diagrams Student
In the analysis & design phases, class diagrams are used to organize the attributes and operations of a class. The simplest class diagram lists only the names of attributes without their types, and lists method names without parameters or types. Student Simplicity is good name ssn birthdate gpa ‘get’ and ‘set’ methods are implied and not shown registerForCourse() dropCourse() chooseMajor() 5/12/2019

10 Basic Class Notation A box represents a class
Topmost box is the name of the class Middle box lists attributes Bottom box contains operations Graphical notes about your model are depicted in boxes with folded corners Class name <<Class name>> <<Attribute>> Attributes <<Operations>> In UML an ‘operation’ is a service that you can request from any object of a class; a ‘method’ is a specific implementation of the operation. Operations 5/12/2019

11 The characters -, #, and + convey visibility
Basic Class Notation The characters -, #, and + convey visibility Visibility + public_attr # protected_attr - private_attr + public_opr() # protected_opr() - private_opr() 5/12/2019

12 Basic Class Notation Class diagram for the BankAccount class
- balance : double + depositFunds(amount:double):void + getBalance():double # setBalance():void + withdrawFunds(amount:double):double 5/12/2019

13 Example of a note that conveys meaning
Basic Class Notation Example of a note that conveys meaning Bank + addAccount() + totalHoldings() + totalAccounts() + deposit() + balance() The bank holds onto a number of Accounts and provides operations For manipulating those accounts. 5/12/2019

14 Static attributes are underlined
UML Class Diagrams Static attributes are underlined Student totalStudents name ssn birthdate gpa registerForCourse() dropCourse() chooseMajor() 5/12/2019

15 Simplified Class Diagram
To avoid getting too detailed during analysis, you can convey only the public interface of a class, without all the details of method arguments and attributes. Bank addAccount() totalHoldings() totalAccounts() deposit() balance() 5/12/2019

16 Stereotypes You can make a model more descriptive by using stereotypes. A stereotype is a UML element that allows you to extend the vocabulary of the UML language. It consists of a word or phrase enclosed in << >>. A stereotype is placed above or to the side of an existing element. BankAccount <<accessor>> +getBalance() + depositFunds() + withdrawFunds() 5/12/2019

17 Stereotypes Stereotypes
To indicate a class is an abstract class, you either use italic font for the class name or add a constraint. BankAccount {abstract} - balance : double + depositFunds(amount:double):void + getBalance():double # setBalance():void + withdrawFunds(amount:double):double 5/12/2019


Download ppt "The Unified Modeling Language"

Similar presentations


Ads by Google