架构师训练营 - 食堂就餐卡系统设计
1 系统需求
系统中每个消费者都有一张卡,在管理中心注册缴费,卡内记着消费者的身份、余额。
使用时将卡插入收款机则显示卡上金额,服务员按收款机上数字键,收款机自动计算并显示消费额及余额。
管理中心的管理员监视每一笔消费,可打印出消费情况的相关统计数据。
2 用例分析
系统的主要功能是:消费、收款、管理;消费包括消费者去注册中心注册、充值、插卡消费;收款主要是服务员通过收款机收款;管理主要是管理员通过管理中心进行就餐卡发放、充值、查询、销卡、打印等;
分析确定系统的执行者:消费者、收费员、管理员
确定用例:消费、收款、管理中心、收款机
对用例进行分解得到管理中心和收款机的用例图

3 系统部署图与整体设计
3.1 系统部署图

3.2 管理中心系统组件图

3.3 充值场景下各组件序列图

3.4 消费场景下各组件序列图

评论