UML Auto Saved)

download UML Auto Saved)

of 24

Transcript of UML Auto Saved)

  • 8/8/2019 UML Auto Saved)

    1/24

    SE LAB FILE

    Submitted to

    By

    Hanut Singh

    5CS2 (Y)

    522

    A2305208235

    1

  • 8/8/2019 UML Auto Saved)

    2/24

    INDEX

    UML

    S.NO

    PROGRAM DATE SIGN

    1 UML

    2 USE CASE DIAGRAM

    3 REGISTRATION PROCESS

    4 LIBRARY MANAGEMENT

    5 STEREOTYPING

    6 CLASS DIAGRAM

    7 INHERITANCE

    8 SINGLE INHERITANCE

    9 MULTILEVEL INHERITANCE

    10 HYBRID INHERITANCE

    11 HEIRARCHICAL INHERITANCE

    12 MULTIPLE INHERITANCE

    13 STATE CHART DIAGRAM

    14 ACTIVITY DIAGRAM

    15 What is the difference between activity and state

    diagram?

    1

  • 8/8/2019 UML Auto Saved)

    3/24

    UML -:

    Unified Markup Language used for specifying visualization, constructing and documenting the

    artifacts of the software system

    UML represents a collection of best engineering practices that have proven successful in

    modeling of large complex system

    UML uses graphical notation to express the design of software projects. UML helps project team

    communicate, explore potential design and validate he architectural design of the software

    Goals OfUML

    Manage project complexity

    Changes in the project can be made easily

    Provides users with a ready to use expressive visual modeling language so they can

    develop and exchange meaningful models

    Types of UML diagrams

    Use Case Diagram

    Class Diagram

    Object Diagram

    Activity Diagram

    State Machine Diagram

    Sequence Diagram

    Interaction Diagram

    Component Diagram

    Deployment Diagram

    1

  • 8/8/2019 UML Auto Saved)

    4/24

    USE CASE DIAGRAM

    Actor

    Use Case

    Use Case Model captures requirements of a system, use cases are means of communicating with

    user and other stake holders.

    Two main components are

    Actor

    o

    Use Case

    Actor A usecase diagram shows the interaction between the system and entities in the sytem

    are referred to as actor. Actor represents the role which may include human users, external

    hardware or other system

    UseCase - It is a single unit of meaning full work

    1

  • 8/8/2019 UML Auto Saved)

    5/24

    REGISTRATION PROCESS

    Amity University

    Whenever a student enters another year, he has to get him/her re-registered. During this process astudent has to get affidavit, indemnity bond, fee receipt, registration form and registration fees.

    The documents submitted are re verified by the faculty incharge and finally by the program

    leader. Following use case diagram describes this process

    1

  • 8/8/2019 UML Auto Saved)

    6/24

    REGISTRATION PROCESS

    1

  • 8/8/2019 UML Auto Saved)

    7/24

    LIBRARY MANAGEMENT

    The Library Management System is designed & developed for a receipt and issuance of books in

    the library along with the students details. The books received in the library are entered in

    Books Entry form and the new student is entered in the student entry form. When the student

    wants to get the desired book the same is issued on the availability basis to the student. The

    issuance and due date for the returning of the book is also entered into the Book Issue form under

    third menu Book Issue. The student has to pay the fine if any on the basis of no. of days delayed

    deposit of the book in the library.

    1

  • 8/8/2019 UML Auto Saved)

    8/24

    LIBRARY MANAGEMENT

    1

  • 8/8/2019 UML Auto Saved)

    9/24

    STEREOTYPING

    1

  • 8/8/2019 UML Auto Saved)

    10/24

    read reference book s

    by name

    by subject

    by publ isher

    by author

    verification

    issue date

    return date

    search books

    book issue

    book return

    STUDENT

    a dd b oo k d et ai ls m a in ta in d at ab as e

    delete book details

    modify book detai ls

    miscel laneous

    issue library cardsmaintain discipline

    book return

    book issue

    LIBRARIAN

    1

  • 8/8/2019 UML Auto Saved)

    11/24

    CLASS DIAGRAM

    Classes are depicted as boxes with three sections, the top one indicates the name of the class, themiddle one lists the attributes of the class, and the third one lists the methods.

    vehicles

    reg no

    model

    speed()

    vehicleinfo()

    cars

    name

    manyear

    kmsdone

    getname()

    getmanyear()

    A basic class diagram

    INHERITANCE

    1

  • 8/8/2019 UML Auto Saved)

    12/24

    In object-oriented programming (OOP), Inheritance is a way to compartmentalize and reuse code by

    creating collections of attributes and behaviors called objects which can be based on previously created

    objects. In classical inheritance where objects are defined by classes, classes can inherit other classes.

    The new classes, known as Sub-classes (or derived classes), inherit attributes and behavior of the pre-

    existing classes, which are referred to as Super-classes (or ancestor classes).

    There are FIVE types of inheritance:

    1) Single Inheritance

    2) Multi Level Inheritance

    3) Hierarchical Inheritance

    4) Hybrid Inheritance

    5) Multiple Inheritance

    Single inheritance

    1

    http://en.wikipedia.org/wiki/Object-oriented_programminghttp://en.wikipedia.org/wiki/Reusabilityhttp://en.wikipedia.org/wiki/Object_(computer_science)http://en.wikipedia.org/wiki/Class_(computer_science)http://en.wikipedia.org/wiki/Object-oriented_programminghttp://en.wikipedia.org/wiki/Reusabilityhttp://en.wikipedia.org/wiki/Object_(computer_science)http://en.wikipedia.org/wiki/Class_(computer_science)
  • 8/8/2019 UML Auto Saved)

    13/24

    Multilevel inheritance

    1

  • 8/8/2019 UML Auto Saved)

    14/24

    salary

    hra

    basic

    date()overtime()

    finance

    transfer

    tax management

    issue()

    dailysheet()

    administration

    account no

    bank name

    deposit()

    withdraw()

    Hybrid Inheritance

    1

  • 8/8/2019 UML Auto Saved)

    15/24

    hospital

    doctors

    patients

    rooms

    sy nergy card

    void details()

    ic u

    ventialator

    getmedica lsta tus()

    getrooms()

    general ward

    facil it ies

    no of beds

    medic al faci l i ty

    medicines

    nurses s or h

    opreq()

    getmedicines()

    Hierarchical Inheritance

    1

  • 8/8/2019 UML Auto Saved)

    16/24

    Multiple Inheritance

    1

  • 8/8/2019 UML Auto Saved)

    17/24

    vehicles

    reg no

    model

    speed()

    vehicleinfo()

    cars

    name

    manyear

    kmsdone

    getname()

    getmanyear()

    bike

    name

    kms done

    getdetails()

    STATE CHART DIAGRAM

    1

  • 8/8/2019 UML Auto Saved)

    18/24

    State chart diagram is one of the five UML diagrams used to model dynamic nature of a system.

    They define different states of an object during its lifetime. And these states are changed byevents. So State chart diagrams are useful to model reactive systems. Reactive systems can be

    defined as a system that responds to external or internal events.

    State chart diagram describes the flow of control from one state to another state. States are

    defined as a condition in which an object exists and it changes when some event is triggered. Sothe most important purpose of State chart diagram is to model life time of an object from

    creation to termination.

    State chart diagrams are also used for forward and reverse engineering of a system. But the main

    purpose is to model reactive system.

    Following are the main purposes of using State chart diagrams:

    To model dynamic aspect of a system.

    To model life time of a reactive system.

    To describe different states of an object during its life time.

    Define a state machine to model states of an object.

    1

  • 8/8/2019 UML Auto Saved)

    19/24

    State diagram of State diagram of

    A computer A mobile

    1

  • 8/8/2019 UML Auto Saved)

    20/24

    ACTIVITY DIAGRAM

    Activity diagram is another important diagram in UML to describe dynamic aspects of the

    system.

    Activity diagram is basically a flow chart to represent the flow form one activity to anotheractivity. The activity can be described as an operation of the system.

    So the control flow is drawn from one operation to another. This flow can be sequential,

    branched or concurrent. Activity diagrams deals with all type of flow control by using different

    elements like fork, join etc.

    Purpose:

    The basic purposes of activity diagrams are similar to other four diagrams. It captures thedynamic behaviour of the system. Other four diagrams are used to show the message flow from

    one object to another but activity diagram is used to show message flow from one activity to

    another.

    1

  • 8/8/2019 UML Auto Saved)

    21/24

    no button

    pressed

    door open

    floor button not

    pressed

    floor button

    pressed

    press button

    close door

    move to

    floor

    floor not

    present

    press up / down button

    if up button pressed

    on top floor or down

    button pressed in

    basement

    Activity diagram of a lift

    1

  • 8/8/2019 UML Auto Saved)

    22/24

    What is the difference between activity and state diagram?

    State diagram shows the object undergoing a process. It gives a clear picture of the changes in

    the object's state in this process.e.g: ATM withdraw

    Card object state: Checking, Approving, Rejecting

    Activity diagram is a fancy flow chart which shows the flow of activity of a process.

    e.g: ATM withdraw

    Withdraw activity: Insert Card, Enter PIN, Check balance, with draw money, get card

    1

  • 8/8/2019 UML Auto Saved)

    23/24

    SoftwareEngineer

    ing

    LabFile

    Submitted by:

    1

  • 8/8/2019 UML Auto Saved)

    24/24

    Navjot kaur

    5CS2(Y)

    A2305208210

    1