320 likes | 499 Vues
UML basics. UML distilled, a brief guide to the standard Modeling language, by Martin Fowler, 2000. ATM scenario from Object-Oriented Modeling and Design, by J.Rumbaugh, 1991. The ATM asks the user to insert a card The ATM accepts the card and reads its serial number
E N D
UML basics UML distilled, a brief guide to the standard Modeling language, by Martin Fowler, 2000
ATM scenariofrom Object-Oriented Modeling and Design, by J.Rumbaugh, 1991 • The ATM asks the user to insert a card • The ATM accepts the card and reads its serial number • The ATM requests the password • The ATM verifies the serial number and password with the consortium, the consortium checks it with the bank and notifies the ATM of acceptance • The ATM asks the user to select the kind of transaction (withdrawal, deposit, …). The user select withdrawal • The ATM asks for the amount of cash • The ATM verifies that the amount is within predefined policy limits and asks the consortium to process the transaction. The consortium passes the request to the bank, which eventually confirms success and returns the new account balance • The ATM dispenses cash and asks the user to take it • The ATM asks whether the user wants to continue, the user indicates no • The ATM prints a receipt, ejects the card, and asks the user to take them • The ATM asks a user to insert a card
Class Diagrams • Associations • Associations ends • Role names • Multiplicity • navigability • Uni/Multidirectional • Generalization • Constrains
Ordering Qualified association
Interfaces and Abstract Classes • Generalization • Realization • Dependency
ATM scenariofrom Object-Oriented Modeling and Design, by J.Rumbaugh, 1991 • The ATM asks the user to insert a card • The ATM accepts the card and reads its serial number • The ATM requests the password • The ATM verifies the serial number and password with the consortium, the consortium checks it with the bank and notifies the ATM of acceptance • The ATM asks the user to select the kind of transaction (withdrawal, deposit, …). The user select withdrawal • The ATM asks for the amount of cash • The ATM verifies that the amount is within predefined policy limits and asks the consortium to process the transaction. The consortium passes the request to the bank, which eventually confirms success and returns the new account balance • The ATM dispenses cash and asks the user to take it • The ATM asks whether the user wants to continue, the user indicates no • The ATM prints a receipt, ejects the card, and asks the user to takes them • The ATM asks a user to insert a card
Exercises (X + Y/2) / (X/3 + Y)
Categorize relationships • A country has a capital city • A person use a fork • A file is an ordinary file or a directory file • Files contains records • A polygon is composed of ordered set of points • A drawing object is text, a geometrical object or a group • A person use computer language on a project • Modem and keyboard are input / output devices • A person plays in a team in certain year • A rout connects two cities • A studen takes a course from a professor
State diagram • Caller lifts receiver • Dial tons begins • Caller dials digit (5) • Dial tons ends • Caller dials digit (5) • Caller dials digit (5) • Caller dials digit (1) • Caller dials digit (2) • Caller dials digit (3) • Caller dials digit (4) • Called phone beings ringing • Ringing tones appears in calling phone • Called party answers • Called phone stops ringing • Ringing phone disappears in calling phone • Phones are connected • Called party hangs-up • Phones are disconnected • Caller hangs-up