MyMisPal
← Systems analysis lessons
Lesson 9 of 11

UML: class, activity and sequence

A class diagram resembles an ERD, but each class has attributes and operations (methods), because it describes program objects, not just data tables.

Student- studentId: int- name: String+ placeOrder(): OrderOrder- orderId: int- status: String- total: double+ pay(): boolean+ cancel(): voidplaces10..*

An activity diagram shows the steps of a process and its decisions, like a flowchart:

Choose itemsSend order and payPayment OK?yesPrepare orderNotify studentnoRetry

A sequence diagram shows messages between parties in time order, top to bottom:

StudentAppPayment gatewayBaristaPlace orderRequest paymentPaidOrder ticketReadyNotify: order ready
Spotted a mistake on this page, or have an idea to improve the site?