ELEC5620 2022 期末真题图解:LSCM 物流供应链系统
ELEC5620 2022 期末真题图解:LSCM 物流供应链系统
这是目前唯一一份接近真实题型的卷子:一个场景,8 道题,共 30 分,每题都要画一种模型(只有 Q2 是文字表格)。每题按「题目 → 画图思路 → 答案图 → 扣分点」写。记号细节见 考试画图速成。
卷子上的绿色 Answer 只有一段文字提纲,有些地方和场景对不上(例如场景里没有 Merchant Directory、quotation)。下面的答案按场景原文重新做,所有图之间用同一套类名和对象名,考试时这种跨图一致本身就是得分点。
场景要点(先圈出来)
Matrix Software builds a Logistic and Supply Chain Management (LSCM) system for an international trading company. Users: international suppliers, importers, logistic companies, government agencies, IT operation team. Importers put orders to suppliers; the system automates procurement and shipment with logistics companies and customs. It shows shipment date, time, ID, order number, freight data. Importers monitor procurement, manufacturing and logistics, and allocate stock automatically for high-priority orders. Order processing: creation, delivery (multiple suppliers and shipments), payment and invoicing. Warehouse management (standalone, integrated): labour, materials, floor space, operational protocols. Transportation management: rail/air/sea, exchanges data with logistic companies' systems; route planning is based on monitoring. BI and analytics for process evaluation and risk. Collaboration: partnerships, shared item/shipment status, transparent inventory, identity access. Control: account management, system support, security management; operation team evaluates the deployment environment (computing systems, remote and distributed devices), configures client installation and registers them in the database. Security: audit trail, encryption, fault tolerance, recovery, access control.
圈名词得到类:Importer、Supplier、LogisticsCompany、GovernmentAgency、Order、OrderLine、Product、Invoice、Payment、Shipment、TrackingEvent、CustomsDeclaration、Warehouse、StockItem、Partnership、UserAccount。圈动词得到功能:下单、付款开票、跟踪、规划路线、分析、结伙伴、部署安装。
Q1. Feature Diagram [4 marks]
Please draw an overall Feature Diagram for this system.
画图思路
- 根 = LSCM System;第一层 = 场景每一段对应的功能块,共 7 个。
- 逐个定 ● / ○:场景说 “provides / handles / includes” 的是 mandatory;Warehouse Management 是 “standalone … integrated”,Collaboration 是 “also has collaborative features”,都可以不装,画 optional。
- 有“至少选一种”的地方画 or 扇形:运输方式 rail / air / sea 至少支持一种 → 实心扇形。
- 跨树约束从场景的“based on”找:route planning is a function based on monitoring → Route Planning requires Shipment Monitoring。
- 特征写名词短语(功能/属性),不要写流程步骤。
扣分点:圆点画在父节点一端(应画在子特征一端);or(实心扇形)和 xor(空心扇形)画反;漏掉跨树约束;把 “search merchant → place order” 这种步骤画成特征。本题场景里没有“只能选一个”的地方,所以没有 xor;如果你想展示 xor,可以写 Payment Method: Bank Transfer xor Letter of Credit,但要在旁边写一句假设。
Q2. Use Case Specification [3 marks]
Please write one Use Case Specification for a supplier company that receives an order and completes the transaction in the LSCM system.
思路:只写一个用户目标级用例:Fulfil Order。主场景从“收到订单”写到“交易完成(收款)”,每一步“谁做什么”;扩展编号对应主场景步骤号。
| Field | Content |
|---|---|
| Name | Fulfil Order |
| Goal | Supplier delivers the ordered goods and gets paid |
| Level | User goal |
| Primary actor | Supplier company |
| Supporting actors | Importer, Logistics company, Customs agency (Government) |
| Precondition | Supplier is registered and logged in; an importer has submitted an order to this supplier |
| Trigger | System notifies the supplier of a new order |
| Success (post) condition | Goods delivered, invoice paid, order status = COMPLETED, transaction logged in audit trail |
| Failure condition | Order rejected or cancelled; importer told why; allocated stock released |
Main success scenario
- Supplier opens the new order and reviews items, quantities and delivery date.
- System checks the supplier's stock and shows availability.
- Supplier accepts the order; system sets status ACCEPTED and notifies the importer.
- System generates the invoice and sends it to the importer.
- Supplier packs the goods and books a shipment; system sends the booking to the logistics company and creates a shipment ID.
- System submits the customs declaration to the customs agency.
- Logistics company picks up the goods; system tracks the shipment until proof of delivery.
- Importer confirms receipt.
- System records the importer's payment, marks the order COMPLETED and notifies both parties.
Extensions
- 2a. Insufficient stock: 2a1. Supplier proposes a partial shipment or new date; 2a2. If the importer agrees, continue at step 3; otherwise the order is cancelled (use case fails).
- 3a. Supplier rejects the order: system notifies the importer with the reason; use case fails.
- 5a. Shipment booking fails: system keeps the order ACCEPTED, alerts the supplier and the operation team, and retries.
- 6a. Customs hold: supplier uploads missing documents; continue at step 7.
- 9a. Payment not received within the due date: system sends a reminder; after the second reminder it escalates to account management.
扣分点:没写 Trigger、Pre/Post condition;只有主场景没有 Extensions;扩展编号不对应步骤号;写成 UI 操作(click button)或数据库细节。
Q3. Class Diagram [6 marks]
Please specify the required classes and draw an overall Class Diagram for the system, and properly use associations, e.g., generalisation, composition, interface, multiplicity, etc.
画图思路(6 分,题目点名的几种关系每种都要出现)
| 关系 | 本题用在哪 | 理由(考试时写一句) |
|---|---|---|
| Generalisation(实线 + 空心三角指向父类) | Importer / Supplier / LogisticsCompany / GovernmentAgency → 抽象类 Party | 都是参与方,共享 id、名字、国家、注册 |
| Composition(实心菱形在整体端) | Order ◆— OrderLine;Shipment ◆— TrackingEvent | 订单删了明细就没意义;跟踪记录只属于这票货 |
| Aggregation(空心菱形在整体端) | Warehouse ◇— StockItem | 库存可以调到别的仓库,独立存在 |
| Interface + realisation(虚线 + 空心三角) | SeaCarrierAdapter、AirCarrierAdapter 实现 «interface» ICarrierSystem | 场景:运输模块直接和物流公司系统交换数据,每家系统不同,用接口隔离 |
| Dependency «use»(虚线开放箭头) | TransportationManager ⇢ ICarrierSystem | 只是调用 |
| Multiplicity | 每条关联两端都写 | 例:Order 1..* Supplier(多供应商订单),Order 1 — 1..* Shipment(多票运输) |
| Enumeration | ShippingMode {RAIL, AIR, SEA}、OrderStatus | 属性类型 |
步骤:先列类(上面圈出的名词),每个类写 2–4 个带类型的属性和关键操作;先画泛化,再画关联并写两端多重性和关联名,最后判断菱形和接口。
扣分点:漏多重性(最常见);菱形画在部分一端;泛化三角指向子类;接口实现画成实线(应是虚线空心三角);把动作当类(“Shipping” 是动作,“Shipment” 才是事物);属性没类型。卷面上不用画这么多类,12 个左右、每种关系至少出现一次就够。
Q4. Collaboration Diagram + Object Diagram [5 marks]
Please draw a Collaboration Diagram to describe the roles in the system and apply the collaboration in an Object Diagram.
画图思路
- 协作描述“角色”,不是具体对象:外框(虚线矩形或虚线椭圆)写
«collaboration» InternationalTrade;里面每个角色写角色名 : 类型,不下划线;角色之间画连接器(实线),可写含义。 - 至少放一个无类型角色(analyst),说明任何对象都能扮演。
- 套用到对象图(collaboration use):画一个虚线椭圆
trade17 : InternationalTrade,用虚线连到具体对象,线上写这个对象扮演的角色名。对象写名字 : 类名下划线,第二栏写属性值,对象之间的实线链接必须对应 Q3 类图里存在的关联。 - 同一对象可以扮演多个角色:acme 同时是 buyer 和 analyst,这正是协作“角色 ≠ 实例”的要点。
扣分点:角色加了下划线(变成对象了);对象没下划线或写了类型而不是值;对象图链接上写多重性;对象图里出现类图没有的关联;协作和对象图没有对应关系(这题 5 分,“apply” 那一半就是看角色绑定)。
Q5. Communication Diagram [3 marks]
Please draw a Communication Diagram for an importer and a supplier to form a partnership and use the analytical tools to optimise their business process.
画图思路:对象框(下划线)+
对象之间的链接;每条消息写 序号: 消息名(参数)
和指向接收方的箭头;嵌套调用用
1.1、2.1,自调用画在自链接上。题目两件事都要覆盖:结伙伴(1–2.2)和用分析优化流程(3–6)。
最后两步(4、5)就是“optimise their business process”:importer 根据交货期 KPI 调整补货点和订单优先级;supplier 在 6 看准时率改发货计划。
扣分点:没编号或编号不连续(通信图靠编号表示顺序);箭头方向看不出谁发给谁;两个对象之间没有链接却写了消息;画成顺序图(有生命线)。
Q6. Activity Diagram [3 marks]
Please draw an Activity Diagram for an importer to use the LSCM system to search for merchants and place an order.
画图思路
- 两条泳道:Importer、LSCM System(动作放在执行者的泳道里)。
- 判断用菱形 decision,出边写互斥守卫
[yes]/[no];循环的回流箭头必须回到菱形(这里一个菱形兼做 merge 和 decision),不能直接指回某个动作框:一个动作有两条入边在 UML 里等于隐式 join,会一直等下去。 - 订单通过后系统同时做三件事 → fork 粗线分出、join 粗线收口。
- choice(decision)vs parallel(fork):decision 只走一条分支,用 merge 收;fork 所有分支同时走,用 join 收。混用就是死锁或重复执行。
扣分点:fork 后用 merge 收(应 join)或 decision 后用 join 收(死锁);循环箭头直接指回动作框;守卫缺失或不互斥;没有泳道或动作放错泳道;没有开始/结束节点。
Q7. State Machine Diagram [3 marks]
Please draw a State Machine Diagram of the system for an item shipped from a supplier to an importer.
画图思路
- 对象 = 一票货(Shipment)。状态用“持续的情况”命名:Created、Packed、InTransit、Delivered、Received,加上 Cancelled、Exception。
- 每条转移写
事件 [守卫] / 动作;主要状态写entry /、exit /动作(老师强调过)。 - 复合状态 InTransit 里放 Shipped → AtCustoms →
OutForDelivery;
lostOrDamaged从复合状态边界出去,表示运输中任何子状态都可能丢货。 - 三种事件都用上:信号事件
carrierPickup;时间事件after(7 days)(进口商不确认就自动确认收货);变化事件when(eta > dueDate)(写成 Shipped 的内部转移,延误告警但不离开状态)。 - choice 伪状态(菱形):清关结果
[cleared]/[not cleared];理赔结果[reship]/[refund]。
自查动作顺序:在 AtCustoms 时清关通过,执行顺序是
payDuties()(exit)→(转移无动作)→
sendETA()(OutForDelivery 的 entry)。
扣分点:状态名写成动作(“Ship”);转移只写事件不写动作;把状态机画成活动图(节点是动作);同一事件的守卫不互斥;漏掉初始/终态。
Q8. Sequence Diagram [3 marks]
Please draw a Sequence diagram for a new supplier to join and install the LSCM system.
画图思路:按场景最后一段走:申请加入 → 身份验证 → 建档 → 运维团队评估部署环境(computing systems、remote and distributed devices)→ 配置客户端 → 登记到数据库 → 安装 → 开账户。
- 外框
sd JoinAndInstallLSCM;参与者名字 : 类,人用 actor 小人。 - 同步调用:实线 + 实心箭头;返回:虚线 + 开放箭头;异步(通知、发安装包):实线 + 开放箭头。
- 组合片段:
alt [verified] / [rejected],loop [for each device];创建对象:箭头指向画低一些的prof : SupplierProfile框。
扣分点:同步/异步/返回箭头混用;alt 没写守卫;生命线用函数名而不是对象;漏掉场景关键词(evaluate deployment environment、register to database);消息名在类图里完全找不到对应(至少核心对象要和 Q3 一致)。
时间分配建议
真题 8 题 30 分,2 小时闭卷。按分值给时间:类图 6 分 ≈ 25 分钟;协作 + 对象图 5 分 ≈ 20 分钟;特征图 4 分 ≈ 15 分钟;其余 3 分题各 ≈ 10–12 分钟;留 10 分钟查记号(对照 考试画图速成 最后的检查表)。先画类图,后面的对象图、顺序图、通信图都复用它的类名。