UML UML n n n UMLOMG1997 11 Booch
标准建模语言UML UML概要 n n n UML由OMG与1997年 11月批准为标准建模语言 (Booch, Jacobson, Runbaugh)。 UML建立在当今国际上最有代表性的三种面向对 象方法(Booch(Grady Booch : The Booch method targets object-oriented analysis and design with emphasis on detailed design)方法, OMT(Object Modeling Technique)方法,OOSE 方法)的基础之上。 UML是一种建模语言而不是一种方法,UML本身 是独立于过程的。
标准建模语言UML (类图) n 单一继承 Powered Vehicle Car Truck
标准建模语言UML (类图) n 多重继承 Aircraft Airplane Powered Vehicle Car Truck
标准建模语言UML (类图) n 关联的基本UML表示法 雇员 Person 0. . * Employment 居民 0. . 1 Company 雇主 0. . * Residence Site 1. . * 1. . 1 Country
标准建模语言UML (类图) 多向关联 Item. Purchase Catalog unit. Price: Money Company 0. . * 厂商 0. . * 产品 0. . * 减价程度 Purchased. Quantity Item. Type
标准建模语言UML (类图) 聚集 Mgmt. Report Corporation 0. . * text. Part 0. . * Paragraph 1 division 1. . * Corporate. Division
标准建模语言UML (类图) * 订单 Date. Received is. Prepaid number: String prce: Money Dispatch() close() 1 1 Name address Credit. Rating(): String 项 * 订单项 Quantity: Integer * price: Money is. Satisfied: Boolean 客户 团体客户 个人客户 Contact. Name credit. Rating credit. Limit Credit. Card# Remind() billfor. Month(Intrger) 1 * 产品 销售代表 0. . 1 雇员 {credit. Rating() =“poor”}
标准建模语言UML (状态图) Custom order Status cust. Submits. Order tentative After(30 days Cust. notify. Canceled(self) ) cust. Confirms. Order cust. Cancels. Order canceled entry/self. cancel confirmed cust. Cancels. Order [self. fulfillment. Status not=shipped]
标准建模语言UML (合作图) Eg. 从一个帐户(from. Account)传送一笔资金 到另外一个帐户(to. Account) 1. transfer. Funds(. . ) from. Account: Bank. Account 2. deposit. Funds(. . ) to. Account: Bank. Account
标准建模语言UML (合作图) *: scale(factor: Positive. Real) curr. Desktop: desktop 1 0. . * icons : (Polygon)
标准建模语言UML (合作图) sender. Object: Class 1 message 1(self: Class 1, …) sender. Object: Class 1 Self作为一个参数来传递 sender. Object: Class 1 message 2(. . ) self: Class 1 发送对象发送一个消息给它自身(self是目标对象)
标准建模语言UML (案例:ATM系统软件) 交易是ATM系统软件的核心设计 Card number: Integer name: String trx: Transaction[*] * * ATM serial. Number: Integer location: String trx: Transaction[*] Transaction time: Date content: String card: Card atm: ATM
标准建模语言UML (案例:ATM系统软件) ATM Manager ATM系统软件的局部设计 Bank. Info 1 * manages 1 manages Card * * Transaction * ATM
标准建模语言UML (案例:ATM系统软件) ATM系统软件设计总图 ATM Manager 1 * ATM Cashier Internet Bank. Info 1 manages * Card * * Agent 1 manages * Transaction * 1
标准建模语言UML (案例:ATM系统软件) n 持久对象设计 《persistent 》 ATM 《persistent 》 Cashier 《persistent 》 Internet * Bank. Info 1 * 1 1 * 《persistent 》 Dailylog 1 《persistent 》 Card * * * 《persistent 》 Agent 《persistent 》 ATM Manager 《persistent 》 Transaction * *
标准建模语言UML (案例:ATM系统软件) n 动态分析 ATM System Withdraw Deposit Inquiry Receipt
标准建模语言UML (案例:ATM系统软件) Interface ATM Manager Bank Candidate Algorithm 《access oprations》 login(card. Info: Card. Info) logout() 《operations on an account》 get. Balance(): Float get. History(): String 《access operaiton》 login(account. Info: Account. Info) logout(account) 《account management》 open(accuont. Info: Account. Info, initial. Amount: Float) remove(account. Info: Account. Info)
标准建模语言UML (案例:ATM系统软件) n 界面设计 bank 《interface》 Account Mgr. IF Account. IF implements 《IF Impl》 Account Mgr. Impl manages 1 * 《IF Impl》 Account Impl
标准建模语言UML (案例:ATM系统软件) n 界面的详细定义 《interface》 Account. IF 《get operations》 get. Balance(): Float get. Account. Info(): Account. Info get. History(): String 《transaction operations》 Deposit(amount: float): Float Withdraw(amount: Float): Float transfer. To(account. Name: string, amount: Float): Float Paybill(receiver: String, amount: Float): Float 《interface》 Account. Mgr. IF 《access operations》 Login(account. Info: Account. Info): Account. IF Logout(account: Account. IF) 《account management》 Open(account. Info: Account. Info, initial Amount: Float): Account. IF Remove(account. Info: Account. Info) Showaccounts(): String
标准建模语言UML (案例:ATM系统软件) ATM Manager 界面 《interface》 Session. IF 《get operations》 get. Balance(): Float get. Account. Info(): Account. Info get. History(): String 《transaction operations》 Deposit(amount: float): Float Withdraw(amount: Float): Float transfer. To(account. Name: string, amount: Float): Float Paybill(receiver: String, amount: Float): Float Account. Impl Balance: Float account. Info: Account. Info History: String 《get operations》 get. Balance(): Float get. Account. Info(): Account. Info get. History(): String 《transaction operations》 Deposit(amount: float): Float Withdraw(amount: Float): Float transfer. To(account. Name: string, amount: Float): Float Paybill(receiver: String, amount: Float): Float
标准建模语言UML (案例:ATM系统软件) 《interface》 Session. Mgr. IF 《access operations》 login(card. Info: Card. Info): Session. IF logout(Session: Session. IF)
标准建模语言UML (案例:ATM系统软件) ATM Central Server 包含的两个界面 atmcs 《interface》 Session Mgr. IF Session. IF implements 《IF Impl》 Session Mgr. Impl manages 1 * 《IF Impl》 Session Impl 1 1 《interface 》 account Account. IF
UML的扩展 n n n 实时模型 UML-RT 可执行模型 企业计算 Enterprise Distributed Object Computing (EDOC) Enterprise Application Integration (EAI) n n 软件过程 Rational Unified Process (RUP) 其他 Standard for Data Warehousing CORBA maps to UML XMI format for the exchange of UML models in text format
UML框架下的软件 程 n n n 我们已经有了统一的建模语言UML 我们正在拥有统一软件过程(RUP? ) 下一步是什么? n n A Software Component Marketplace Quality from the Beginning Give Soul to Software Process A Complete UML Based Software Platform Ivar Jacobson
UML时间表 n n n 1997 ---1998 ---2000 ---2002 ---2004 ---- UML version 1. 0, version 1. 1 UML version 1. 3 UML version 1. 4 ? UML version 2. 0 ? 一个稳定完善的UML version ?
UML的国际会议 n n <<UML>> 98 ---- The First International Workshop on The Unified Modeling Language, 3 - 4 June, 1998, Mulhouse, France <<UML>> 99 ---- The Second International Conference on The Unified Modeling Language, 28 - 30 October, 1999, Fort Collins, Colorado, USA <<UML>> 2000 ---- The Third International Conference on the Unified Modeling Language, 2 - 6 October, 2000, York, UK <<UML>> 2001 ---- The Fourth International Conference on the Unified Modeling Language, 1 - 5 October, 2001, Toronto, Canada Lecture Notes in Computer Science, Springer
- Slides: 96