Problem Analysis & Design Representation

Understanding Device Drivers

How do you analyze a problem statement or description and represent your understanding in a standard format?
The Unified Modeling Language™ (UML) was developed jointly by Grady Booch, Ivar Jacobson, and Jim Rumbaugh with contributions from other leading methodologists, software vendors, and many users. The UML provides the application modeling language for:

  • Process modeling/ Requirement Analysis with Use-cases.
  • Static Design with Class and object modeling.
  • Dynamic Design with sequence, collaboration and activity diagrams.
  • Realtime Systems design models.
  • Distribution and deployment modeling.

Phases of System (Hardware & Software) Developement

  1. Requirement Analysis
    The functionality users require from the system: Use-case model
  2. OO Analysis
    Discovering classes and relationships: Class diagram
  3. OO Design
    Result of Analysis expanded into technical solution: Sequence diagram, state diagram, etc.
    Results in detailed specs for the coding phase
  4. Implementation (Programming/coding)
    Models are converted into code
  5. Testing
    Unit tests, integration tests, system tests and acceptance tests.

Use Case Modeling

  • In use-case modeling, the system is looked upon as a black box whose boundaries are defined by its functionality to external stimuli.
  • The actual description of the use-case is usually given in plain text. A popular notation promoted by UML is the stick figure notation.
  • We will look into the details of text representation later. Both visual and text representation are needed for a complete view.
  • A use-case model represents the use-case view of the system. A use-case view of a system may consist of many Use-case diagrams.
  • A use-case diagram shows (the system), the actors, the use-cases and the relationship among them.

The System of Usecase Model

As a part of the use-case modeling, the boundaries of the system are developed. System in the use-case diagram is a box with the name appearing on the top. Define the scope of the system that you are going to design with your Android App (software scope) or your Arduino Game (hardware scope).

The Actors of Usecase Model

An actor is something or someone that interacts with the system. Actor communicates with the system by sending and receiving messages. An actor provides the stimulus to activate an Use-case. Message sent by an actor may result in more messages to actors and to Use-cases. Actors can be ranked: primary and secondary; passive and active. Actor is a role not an individual instance.

Finding Actors The actors of a system can be identified by answering a number of questions:
  • Who will use the functionality of the system?
  • Who will maintain the system?
  • What devices does the system need to handle?
  • What other system does this system need to interact?
  • Who or what has interest in the results of this system?

Usecases

A Use-case in UML is defined as a set of sequences of actions a system performs that yield an observable result of value to a particular actor. Actions can involve communicating with number of actors as well as performing calculations and work inside the system. A Use-case is always initiated by an actor.
  1. provides a value to an actor.
  2. must always be connected to at least one actor.
  3. must be a complete description.

Finding Usecases

For each actor ask these questions:
  • Which functions does the actor require from the system?
  • What does the actor need to do?
  • Could the actor's work be simplified or made efficient by new functions in the system?
  • What events are needed in the system?
  • What are the problems with the existing systems?
  • What are the inputs and outputs of the system?

Example Usecase Analysis

Conider the problem of designing a vending machines for drinks. Lets analyze this problem using usecase modleing