Professional Documents
Culture Documents
UML Charts
UML Charts
UML Charts
Software Engineering
Assoc. Prof. Dr. Ahmet Çağdaş SEÇKİN
• Unified Modeling Language • Class Diagram
• Object Diagram
(UML) is a standardized
• Use Case Diagram
modeling language used in
• Sequence Diagram
software engineering for • Activity Diagram
visualizing, specifying, • State Machine Diagram
constructing, and • Component Diagram
documenting software • Deployment Diagram
systems. • Package Diagram
• UML includes several • Communication Diagram
diagram types, each serving • Composite Structure Diagram
a specific purpose. • Timing Diagram
• Interaction Overview Diagram
• Profile Diagram
• Component Interaction Diagram
• Information Flow Diagram
A class diagram represents the
static structure of a system by
showing classes, their attributes,
methods, and the relationships
between classes.
• StockExchange is a class representing a stock
exchange with properties such as name and
location. It has a one-to-many relationship
with Trader classes, indicating that one stock
exchange can have multiple traders. It also
contains multiple Stock objects.
• Stock is a class representing a stock with
properties like symbol, company name, and
price.
• Trader is a class representing a trader with
properties such as ID and name. Traders can
buy and sell stocks, which are represented by
associations with the Stock class.
An object diagram represents instances of classes and their
relationships at a specific point in time. It provides a snapshot
of the system's runtime state
We define three classes (StockExchange, StockTrader, and Stock) and create object instances of these classes to
represent a stock exchange scenario. The diagram shows the "NY Stock Exchange" as the stock exchange entity,
two traders ("Alice" and "Bob") as members of the exchange, and their ownership of stocks (AAPL and GOOG).
The diagram illustrates the relationships between objects and their attributes.
• A use case diagram models the interactions between an external actor and the system to show how the system
responds to various inputs or actions.
• Actors: Investor, StockBroker, and Administrator are the primary actors interacting with the stock exchange system.
• Use Cases:
• View Market: Both investors and stockbrokers can view the stock market.
• Place Order: Investors can place orders to buy or sell stocks.
• View Portfolio: Investors can view their stock portfolio.
• Execute Order: Stockbrokers execute the orders placed by investors.
• Manage Stocks: Administrators can manage stock-related operations, which extends the functionality of "View Market." If an
administrator manages stocks, it implies viewing the market as well.
• Manage Users: Administrators can manage user-related operations, which also extends the functionality of "View Market."
• The key concept demonstrated here is "extending" use cases. When one use case extends another, it means that it
provides additional or optional behavior. In the example, we use the <<extends>> notation to indicate that the
"Place Order" use case extends the "Execute Order" use case. This means that under certain conditions (e.g., a
specific order type or scenario), the "Place Order" use case may trigger an extension of the "Execute Order" use
case.
• A sequence diagram depicts interactions between objects in a particular
scenario or over a specific time period. It shows the order of messages
exchanged between objects.
• The sequence starts with the trader's
request to buy a stock. The stock
exchange system activates and
subsequently involves a broker to find
an appropriate broker for executing the
order. Once the broker is found, the buy
order is executed and the result is
communicated back to the trader.
• Trader is a participant who initiates the
sequence by requesting to buy stock.
• StockExchange represents the stock
exchange system.
• Broker is an intermediary involved in
executing the buy order.
• Activity diagrams describe the flow of
activities or processes within a system.
They are used to model workflow,
business processes, and the logic of
algorithms.