...

/

Use Case Diagram for the Online Stock Brokerage System

Use Case Diagram for the Online Stock Brokerage System

Learn how to define use cases and create the corresponding use case diagram for the online stock brokerage system.

Let’s build the use case diagram of the online stock brokerage system and understand the relationship between its different components. First, we’ll define the different elements of our online stock brokerage, followed by the complete use case diagram of the system.

System

Our system is a stock brokerage.

Actors

Now, we’ll define the main actors of our online stock brokerage system.

Primary actors

  • Member: The Member is the main user of the system who can create, update, or cancel an account, log in and out, and reset their password. Members can search for stocks, manage watchlists, view stock positions, and place different orders (market, limit, stop-loss, and stop-limit). They can select stock details, cancel orders, and perform transactions via electronic transfer, wire, or check. Members also receive notifications about order and transaction statuses.

Secondary actors

  • Admin: The Admin manages user accounts. They can create, update, or cancel accounts, log in and out, reset passwords, and block or unblock Members when necessary.

  • System: The System handles internal processes such as fetching stock quotes, sending order details to the stock exchange, acknowledging and processing orders, and notifying Members about order and transaction updates.

Use cases

This section will define the use cases for the online stock brokerage system. We have listed the use cases according to their interactions with a particular actor.

Note: Some use cases will occur multiple times because they are shared among different actors in the system.

Member

  • Create account: Register a new user in the system.

  • Update account: Modify existing account information.

  • Cancel membership: Terminate the user’s membership and access.

  • Login/Logout: Authenticate or end a user session.

  • Reset password: Recover access by setting a new password.

  • Search stock inventory: Look up stock details using a symbol.

  • View stock positions: Display current holdings and quantities.

  • Create watch list: Create a new list to track favorite stocks.

  • Update watch list: Add or remove stocks from an existing watchlist.

  • Place order: Submit an order to buy or sell stocks.

  • Select stock details: Choose stock, order type, quantity, and price..

  • Cancel order: Stop a pending order before execution.

  • Deposit money: Fund the account via electronic transfer, wire, or check.

  • Withdraw money: Transfer funds out of the trading account.

  • Receive order notification: Get alerts on order execution status.

  • Receive transaction notification: Be informed about deposit or withdrawal updates.

Admin

  • Create account: Add a new member to the system.

  • Update account: Modify existing member details.

  • Cancel membership: Terminate a member’s access to the system.

  • Login/Logout: Access or exit the admin interface.

  • Reset password: Assist a member in password recovery.

System

  • Fetch stock quotes: Retrieve live stock prices from the exchange.

  • Send order details: Forward order information to the stock exchange.

  • Execute order: Process, match, and fulfill stock orders.

  • Deduct stock: Adjust inventory after trade execution.

  • Send order notification: Notify members of order status changes.

  • Send transaction notification: Inform members of deposit or withdrawal outcomes.

Relationships

This section describes the relationships between and among actors and their use cases.

Generalization

  • The “Electronic bank transfer,” “Wire transfer,” and “Check transfer” use cases are used for transactions. Hence, they have a generalization relationship with the “Transaction” use case.

  • The “Place market order,” “Place limit order,” “Place stop-loss order,” and “Place stop-limit order” use cases represent different ways of placing a trade. Hence, they have a generalization relationship with the “Place order” use case.

Associations

The table below shows the association relationship between actors and their use cases.