...

/

Class Diagram for the Online Stock Brokerage System

Class Diagram for the Online Stock Brokerage System

Learn to create a class diagram for a stock brokerage system using the bottom-up approach.

We'll cover the following...

In this lesson, we’ll identify and design the classes, abstract classes, and interfaces based on the requirements we have previously gathered from the interviewer in an online stock brokerage system.

Components of a stock brokerage system

As mentioned, we will design the online stock brokerage system using a bottom-up approach.

Account

Account: This abstract class stores a person’s account information. It has members like account ID, name, password, account status, address, email, and phone number. There can be two types of accounts: Admin and Member.

Member: They can search the stock, place an order to buy or sell stocks, create an account, start a membership, add stocks to the wish list, add buying and selling limits, and perform transactions in many ways.

Admin: They can block or unblock members, cancel their membership, and reset passwords.

The class diagram of Account and its derived classes
The class diagram of Account and its derived classes

Watch list

A watch list is a list of stocks that an investor monitors to profit from price drops. Below is a visual representation of the Watchlist class.

The class diagram of the Watchlist class
The class diagram of the Watchlist class
Click to see the relevant requirement

Stock

A stock, also known as equity, is a security that represents a portion of the issuing company’s ownership. The Stock class will have a symbol, price, etc.

The class diagram of the Stock class
The class diagram of the Stock class
Click to see the relevant requirement

Search and stock inventory

The StockInventory class will retrieve and keep up with the most recent stock values from the StockExchange class (defined later). The StockInventory class implements the Search interface.

The class diagram of the Search interface and the StockInventory class
The class diagram of the Search interface and the StockInventory class

Stock position

All the stocks the user owns will be included in the StockPosition class.

The class diagram of the StockPosition class
The class diagram of the StockPosition class

Stock lot

A member may purchase various lots of the same stock on various dates. The StockLot class will represent these particular lots.

The class diagram of the StockLot class
The class diagram of the StockLot class
Click to see the relevant requirement

Order

Members can place stock trading ...