系统 Box Office 参与者 buy tickets <<includep> Buy Subscription Clerk 关系 公用电话亭 <include>> Make charges 用例 信用卡服务商 Survey sales 监督员 售票系统的用例图
售票系统的用例图 公用电话亭 Clerk Buy tickets Buy Subscription Make charges 信用卡服务商 监督员 Survey sales 参与者 <<include>> <<include>> 用例 Box Office 系统 关系
Customer name: String hone: String 属性 addo 类范围操作 owner 关联 角色名 Reservation date: Date A泛化 Show Subscription Series Individaul name: String series Integer Reseravtion 多重性 约束 1* performances available: Boolean Performance seat: Stringdate: Date 3.6 sell(c: Customer)I time: TimeOfD exchange 限定符 操作 售票系统的类图
售票系统的类图 Reservation date : Date Customer name : String phone : String add() owner purchased d 1 * Subscription Series series : Integer Individaul Reseravtion Ticket available : Boolean sell(c : Customer) exchange() 3..6 0..1 1 0..1 {xor} Performance date : Date time : TimeOfDay seat : String * 1 seat : String * 1 Show name : String 1 1..* 1 show performances 1..* 多重性 约束 限定符 操作 泛化 关联 角色名 属性 类范围操作 类
Planning 子系统 包 Scheduling 依赖 IrmA Box office Records Ticket Sales Ticket Records subsystem Operations 包图
包图
kiosk Box Office Credit Card Service Request(count, performance) Show Available(seat-list) Select Seats Demand Payment(cost) 生命线(活动的 Insert Card(card Number 消息 charge(card number, cost) authorized print tickets(performance, seats) eject card 顺序图
顺序图 Credit Card Service kjosk Box Office Request(count, performance) Show Available(seat-list) Select Seats Demand Payment(cost) Insert Card(Card Number) charge(card number, cost) authorized print tickets(performance, seats) eject card 生命线(活动的) 消息
kiosk 主动对象 1: request(count, perormance) ∧ 4: offer(seat-list) 5: buy(seats) 8: confirm(seats, cost 3: seat-list =lock (count) 链 6: claim(seats)- 被动对象 ticketseller 7: unlock(seats)—> db: performanceDB <<local>>db 暂时链 消息 2: db: =findDB(p erformance 多对象 performance performance DB 协作图
协作图 ticketseller db:performanceDB performance Gudie :performanceDB kjiosk 主动对象 被动对象 消息 暂时链 <<local>>db 链 多对象 2: db:=findDB(performance) 3: seat-list:=lock(count) 6: claim(seats) 7: unlock(seats) 1: request(count,perormance) 4: offer(seat-list) 5: buy(seats) 8: confirm(seats,cost) dbs