USE CASE DIAGRAM
• Use case diagrams are behavior diagrams used to describe a set of actions (use
  cases) that some system or systems (subject) should or can perform in collaboration
  with one or more external users of the system (actors) to provide some observable
  and valuable results to the actors or other stakeholders of the system(s).
• A use case diagram is used to represent the dynamic behavior of a system. It
  encapsulates the system's functionality by incorporating use cases, actors, and their
  relationships.
                        Purpose of Use Case Diagrams
The main purpose of a use case diagram is to portray the dynamic aspect of a system.
Following are the purposes of a use case diagram given below:
•   It gathers the system's needs.
•   It shows the external view of the system.
•   It recognizes the internal as well as external factors that influence the system.
•   It represents the interaction between the actors.
Components
   •Actor
   •Use Case
   •Relation between Use Case and Actor.
                                 Actor
 Actor is something or someone that interacts with the system by sending or
 receiving messages.
 Actor can be represented like this:
                                    Use Case
Use case is a set of sequence of actions a system perform that yields an observable
result of value. It should always initiated by actor than can provide value to actor. It
must connect at least one actor and should provide complete description.
Use case looks like this:
             Relation between Use Case and Actor
 There are different types of relationships based on the interaction between Actor
 and Use Case:
 Association: It is used to represent between Use Case and Actor; represented by
 solid line.
Generalization: This is used to represents between one general Use Case and a special Use Case that
is used for defining special alternatives; Represented by a line with a triangular arrow head towards the
parent Use Case.
 Include : It occurs when a Use Case (the base Use Case) includes the functionality of another Use
 Case(the Inclusion Use Case). It supports the reuse of functionality in a Use Case model. This would
 represent with dotted line and arrow head.
 Extend : We use this relationship to specify that one Use Case (extension) extends the behavior of another
 Use Case(Base). Like Include Extend relationship also an arrow head with dotted line that includes
 <<extend>>.
                           State Machine Diagram
• The state machine diagram is also called the State chart or State Transition diagram, which
  shows the order of states underwent by an object within the system.
• It captures the software system's behavior. It models the behavior of a class, a subsystem, a
  package, and a complete system.
  Following are the types of a state machine diagram that are given below:
  Behavioral state machine
  The behavioral state machine diagram records the behavior of an object within the system. It
  depicts an implementation of a particular entity. It models the behavior of the system.
  Protocol state machine
  It captures the behavior of the protocol. The protocol state machine depicts the change in the
  state of the protocol and parallel changes within the system. But it does not portray the
  implementation of a particular component.
                    Notation of a State Machine Diagram
1.Initial state: It defines the initial state (beginning) of
a system, and it is represented by a black filled circle.
2.Final state: It represents the final state (end) of a
system. It is denoted by a filled circle present within a
circle.
3.Decision box: It is of diamond shape that represents
the decisions to be made on the basis of an evaluated
guard.
4.Transition: A change of control from one state to
another due to the occurrence of some event is termed
as a transition. It is represented by an arrow labeled
with an event due to which the change has ensued.
5.State box: It depicts the conditions or circumstances
of a particular object of a class at a specific point of
time. A rectangle with round corners is used to
represent the state box.
Simple State Machine Diagram Notation
University state diagram example
                        ACTIVITY DIAGRAM
• Activity diagram is basically a flowchart to represent the flow from one activity
  to another activity. The activity can be described as an operation of the system.
• An activity diagram Shows the flow of activities which are ongoing non-atomic
  operations in a state machine. Activities result in actions which are atomic
  operations.
Activity diagrams comprise of −
•Activity states and action states
•Transitions
•Objects
    Basic components of an activity diagram
•Action: A step in the activity wherein the users or software perform a given
task. Actions are symbolized with round-edged rectangles.
•Decision node: A conditional branch in the flow that is represented by a
diamond. It includes a single input and two or more outputs.
•Control flows: Another name for the connectors that show the flow between
steps in the diagram.
•Start node: Symbolizes the beginning of the activity. The start node is
represented by a black circle.
•End node: Represents the final step in the activity. The end node is
represented by an outlined black circle.
Activity diagram for a banking system