oosefyl.docrailway reservation

download oosefyl.docrailway reservation

of 23

Transcript of oosefyl.docrailway reservation

  • 7/27/2019 oosefyl.docrailway reservation

    1/23

    CONTENTS:

    Problem Statement

    Use case diagram

    Use case description

    Activity Diagrams

    Sequence Diagrams

    Class Diagram

    Collaboration Diagram

  • 7/27/2019 oosefyl.docrailway reservation

    2/23

    PROBLEM STATEMENT FOR RAILWAY

    RESERVATION SYSTEM

    Software has to be developed for automating the manualreservation system of railway.

    The system should be standalone in nature.It should be designed to provide functionalities like bookingof tickets in which a user should be able to applied for ticketsof any train and of any class.A limitation is imposed when the number of tickets for which

    user apply is greater then available seats or no seats areavailable. If seats are not available then put user transactionin the waiting queue. If the tickets are available then it isissued to the user and it must be updated in the databaseconcurrently. The system generates the receipt for thesame.

    The software takes the current system date and time as thedate of issue and calculates the amount to be paid by theuser.It also provide the functionality of cancellation of tickets .Ifthe user wants to cancel the tickets, he/she must enter thedetails. The system check the records from the database if itis matched with the user entered details, then it cancels thetickets.

    The system also calculates the amount to be return to theuser after deductions. The system must update the databasefor the same.After that system must check for waiting passenger for thattrain, if any then these tickets are issued to waiting

    passenger and update the database.The system displays the details of train of which user enterthe name.

    The information is saved and the corresponding updatingtake place in the database.In the enquiry, the system should be able to provideinformation like the availability of tickets of particular train,train schedule.

  • 7/27/2019 oosefyl.docrailway reservation

    3/23

    The system should be able to reserve a ticket for a particularuser if the tickets are not currently available.

    The corresponding print outs for each entry issue/cancel! inthe system should be generated.

    There should be proper information if the waiting list ticket is

    confirmed, through mail or via sms.It should tell us as to which all stations it haults and currentstatus of the train should be informed.Security provisions like the login authenticity should beprovided. "ach user should have a user id and a password.#ecord of the users of the system should be kept in the logfile. $rovision should be made for full backup of the system.

  • 7/27/2019 oosefyl.docrailway reservation

    4/23

    USE CASE DIAGRAM

    Operator

    Login

    Booking

    Enquiry

    Cancellation

    User

  • 7/27/2019 oosefyl.docrailway reservation

    5/23

    USE CASE DESC!PT!ON

    "# LOGIN

    "#" !NTODUCT!ON

    This use case documents the procedure for logging into the Railway Reseration

    System !ased on user priileges"

    #perator $%ogin& En'uiry& (oo)ing& Cancellation*"

    User $%ogin& En'uiry& (oo)ing& Cancellation*"

    "#$ ACTOS

    #perator& User

    "#% PE&COND!T!ONA

    +one

    "#' POST&COND!T!ON

    If use case is successful& the user is logged into the system& otherwise the system state

    is unchanged"

    "#( )*O+ O) E,ENTS

    "#(#" -AS!C )*O+

    This use case starts when actor wishes to log into the Railway ReserationSystem"

    ," The system re'uests that the actor enters his-her user.id and password"

    /" The actor enters user.id and password"

    0" The system alidates the user.id and password and chec)s for his-herpriileges"

    1" If the actor is 2operator3& he-she will !e logged into the system and presented

    with operator4s menu"5" #therwise& if the actor is 2User3& he-she will !e logged into the system and

    presented with user4s menu"

  • 7/27/2019 oosefyl.docrailway reservation

    6/23

    6" The use case ends"

    "#(#$ A*TENATE )*O+

    "#(#$#" !N,A*!D NA.E/PASS+OD

    If the system receies an inalid user.id or password& an error message is

    displayed and the use case ends"

    "#0 SPEC!A* E1U!E.ENTS

    +one

    "#2 E*ATED USE CASES

    +one

    $# ENQUIRY

    $#" !NTODUCT!ON

    This use case documents the procedure of E+7UIR8 for following accounts 9

    ," En'uiry regarding trains

    /" En'uiry for reseration status"

    $#$ ACTOS

    #perator& User"

    $#% PE&COND!T!ON

    #perator must !e logged in to the system

    $#' POST&COND!T!ON

    If use case is successful& the user can get information regarding trains&reseration

    #therwise& the system state is unchanged"

    $#( )*O+ O) E,ENTS

    $#(#" -AS!C )*O+

    The use case starts when a system can get the en'uiry from the user"," The system chec)s the type of en'uiry

    /" The system su!mits the user 'uery to controller of the system "

  • 7/27/2019 oosefyl.docrailway reservation

    7/23

    0" The controller search the information from the data!ase"

    1" The resultant information is presented infront of the user"

    5" The use case ends"

    $#(#$ A*TENATE )*O+S

    $#(#$#" !N,A*!D EN1U!3

    If the user enter the wrong details &then the system shows message according to

    the 'uery and the use case ends"

    $#0 SPEC!A* E1U!E.ENT

    +one

    $#2 E*ATED USE CASES

    +one"

    %# BOOKING

    %#" !NTODUCT!ON

    This use case documents the procedure of !oo)ing of tic)ets and update the data!ase

    after each transaction "

    %#$ ACTO

    #perator& User

    %#% PE&COND!T!ON

    #perator-User must !e logged into the system

    %#' POST&COND!T!ON

    If the use case is successful& the tic)et is issued to the passenger & otherwise the

    system state is unchanged"

    %#( )*O+ O) E,ENTS

  • 7/27/2019 oosefyl.docrailway reservation

    8/23

    %#(#" -AS!C )*O+

    ,"This use case starts when a user enter train name"

    /"The system read the information and chec) the aaila!ility of the seats"

    0"If the seats are aaila!le &the system e:ecute the transaction "

    1"The resultant information is updated in the data !ase"5" The issue details are sent to the printer to generate the tic)ets"

    6" The use case ends"

    %#(#$ A*TENATE )*O+

    %#(#$#" NON &A,A!*A-!*T3

    If the seats are not aaila!le the system sends the message accordingly &and puts

    the user transaction in waiting state &and according to the priority the seats are

    allotted to the users " The use case end here"

    '#CANCELLATION

    '#" !NTODUCT!ON

    This use case documents the procedure for canceling of issued tic)ets according tothe customer transaction"

    '#$ ACTOS

    #perator& User"

    '#% PE&COND!T!ON

    #perator- user must !e logged into the system"

    '#' POST&COND!T!ON

    If the use case is successful & the re'uest or recommendation are fulfilled and

    data!ase is updated accordingly"

    '#( )*O+ O) E,ENTS

    '#(#" -AS!C )*O+

    This use case starts when a enters the details regarding canceling of tic)ets"

    ," The system chec) the details regarding the 'uery of the customer"/" The system updates the train reseration status"

    0" The system refunds the amount to the user after suita!le deductions"

  • 7/27/2019 oosefyl.docrailway reservation

    9/23

    1" The system chec)s list of waiting passengers and allot the acant seats"

    5" The use case ends"

    '#0 SPEC!A* E1U!.ENTS

    +one

    '#2 E*ATED USE CASES

    +one

  • 7/27/2019 oosefyl.docrailway reservation

    10/23

    SE7UE+CE DIAGRAM9

    A se'uence diagram shows interaction among o!;ects as a two

    dimensional chart" The chart is read from top to !ottom" The o!;ects

    participating in the interaction are shown at the top of the

    chart as !o:es attached to a ertical dashed line" Inside the !o:& the name of

    the o!;ect is written with a colon separating it from the name of the class&

    and !oth the name of the o!;ect and class are underlined" The o!;ects

    appearing at the top signify that the o!;ect already e:isted when the use case

    e:ecution was initiated"

  • 7/27/2019 oosefyl.docrailway reservation

    11/23

    SE7UE+CE DIAGRAM 9 (##=I+G

    Operator / User Booking Form Controller Train_detail Sorry message

    bo

    !assenger

    detail

    !asse

    Train

    #$Enter Train

    name %$Submit name

    &$'et Train "etail

    ($C)eck a*ailabil+

    ity o, seats-$

    Seat not a*ailable

    .$dd 0ecord

    1$

    Update "etails

    2$Booking

    Success,ully

    3$

    Update "etails

  • 7/27/2019 oosefyl.docrailway reservation

    12/23

    SE7UE+CE DIAGRAM 9 CA+CE%%ATI#+

    Operator / User Cancellation

    Form

    Controller Train Table !assenger Train

    "etail Table

    #$Enter Train

    "etails%$

    Submit "etails

    &$

    C)eck "etails

    ($Cancel seat

    Update table

    .$Cancellation

    success,ul

    -$Update table

  • 7/27/2019 oosefyl.docrailway reservation

    13/23

    SE7UE+CE DIAGRAM 9 E+7UIR8

    User / Operator Enquiry Form Controller Train_master

    #$Enter "etails

    Searc)

    %$Submit "etails

    &$

    ($S)o4 Train

    5n,ormation

  • 7/27/2019 oosefyl.docrailway reservation

    14/23

    SE7UE+CE DIAGRAM 9 %#GI+

    Operator / User Login Form Controller Login_"etail

    id6pass4ord

    'et Login

    details

    C)eck LoginError or

    Success

    #$

    %$

    &$

    ($

    -$

    submit details

  • 7/27/2019 oosefyl.docrailway reservation

    15/23

    C%ASS DIAGRAM 9

    A class diagram descri!es the static structure of a system" It shows how a system isstructured rather than how it !ehaes" The static structure of a system comprises of a num!erof class diagrams and their dependencies" The main constituents of a class diagram are

    classes and their relationships9 generali>ation& aggregation& association& and arious )inds of

    dependencies"

    The classes represent entities with common features& i"e" attri!utes and operations"Classes are represented as solid outline rectangles with compartments" Classes hae a

    mandatory name compartment where the name is written centered in !oldface" The classname is usually written using mi:ed case conention and !egins with an uppercase" The class

    names are usually chosen to !e singular nouns"

    Login_"etail

    Username

    !ass4ord

    dd78

    "elete78

    Update78

    Train_9aster

    Train id

    Train :ame

    Capacity75/558

    Source

    "estination

    Time

    "ays

    dd78

    "elete78

    Update78

    'et"etails78

    !assenger_Train_"etail

    Train :ame

    Seat no;

    Class75/558

    date

    Time

    dd78"elete78

    Update78

    'et"etails78

    !assenger_"etails

    !assenger :ame

    ddress

    ge

    !)one no;

    Train :ame

    Train_"etails

    "ate

    Time

    Train :ame

    *ailable seats75/558

    dd78

    "elete78

    Update78

    'et"etails78

  • 7/27/2019 oosefyl.docrailway reservation

    16/23

    C#%%A(RATI#+ DIAGRAM9

    A colla!oration diagram shows !oth structural and !ehaioural aspects

    e:plicitly" This is unli)e a se'uence diagram which shows only the

    !ehaioural aspects" The structural aspect of a colla!oration diagram

    consists of o!;ects and the lin)s e:isting !etween them" In this diagram& an

    o!;ect is also called a colla!orator" The !ehaioural aspect is descri!ed !y

    the set of messages e:changed among the different colla!orators" The lin)

    !etween o!;ects is shown as a solid line and can !e used to send messages

    !etween two o!;ects" The message is shown as a la!eled arrow placed near

    the lin)" Messages are prefi:ed with se'uence num!ers !ecause they are the

    only way to descri!e the relatie se'uencing of the messages in this diagram

  • 7/27/2019 oosefyl.docrailway reservation

    17/23

    C#%%A(#RATI#+ DIAGRAM 9 %#GI+

    Operator /User

    LoginForm

    Controller Login_"et

    ail

    ($

    #$

    %$

    -$

    &$

    CO**A-OAT!ON D!A4A. : EN1U!3

    Operator

    /user

    Enquiry

    ,orm

    Controlle

    +r

    Train

    9aster

    #$

    %$

    &$

    ($

  • 7/27/2019 oosefyl.docrailway reservation

    18/23

    CO**A-OAT!ON D!A4A.: -OO5!N4

    Operator

    /User

    Booking

    ,orm

    Controll++

    er

    Train

    "etail

    Sorry 9essagebo !assenger

    "etail!assenger

    Train "etail

    #$ %$ &$

    ($

    -$ .$

    3$

    1

    1$ 3

    3

    2$

  • 7/27/2019 oosefyl.docrailway reservation

    19/23

    STATE D!A4A.

    A state chart diagram is normally used to model how the state of an

    o!;ect changes in its lifetime" State chat diagrams are good at descri!ing

    how the !ehaiour of an o!;ect changes across seeral use case e:ecutions"

  • 7/27/2019 oosefyl.docrailway reservation

    20/23

  • 7/27/2019 oosefyl.docrailway reservation

    21/23

    ACTIIT8 DIAGRAM

    The actiity diagram is possi!ly one modelling element which was not

    present in any of the predecessors of UM%" +o such diagrams were present

    either in the wor)s of (ooch& Baco!son& or Rum!augh" It is possi!ly !ased

    on the eent diagram of #dell ,/ though the notation is ery different

    from that used !y #dell" The actiity diagram focuses on representing

    actiities or chun)s of processing which may or may not correspond to the

    methods of classes" An actiity is a state with an internal action and one or

    more outgoing transitions which automatically follow the termination of the

    internal actiity" If an actiity has more than one outgoing transition& then

    these must !e identified through conditions" An interesting feature of the

    actiity diagrams is the swim lanes" Swim lanes ena!le you to group

    actiities !ased on who is performing them& e"g" academic department s"hostel office" Thus swim lanes su!diide actiities !ased on the

    responsi!ilities of some components" The actiities in a swim lane can !e

    assigned to some model elements& e"g" classes or some component& etc"

  • 7/27/2019 oosefyl.docrailway reservation

    22/23

  • 7/27/2019 oosefyl.docrailway reservation

    23/23