Wednesday, October 10, 2012

Train Reservation System - Use Case Diagram

Use Case Diagram for Train Reservation System is shown below. The various participants of the same are detailed below:

Actors: Traveller, Travel Agent, Station Counter Incharge

The corresponding usecases  for these actors are:
  • Traveller: Book Ticket Online, Cancel Booking Online, Book via Agent, Cancel Ticket via Agent, Book At Counter, Cancel Ticket At Counter, Online Inquiry, Fill Details, Cancel Ticket, Book Ticket, Make Payment, Update Database, Receive Money On Cancellation

  • Travel Agent: Book via Agent, Cancel Ticket via Agent, Online Inquiry, Fill Details, Book Ticket, Make Payment, Cancel Ticket, Update Database, Receive Money On Cancellation

  • Station Counter Incharge: Book At Counter, Cancel Ticket At Counter, Online Inquiry, Fill Details, Book Ticket, Make Payment, Cancel Ticket, Update Database, Receive Money On Cancellation
Here we have some dependencies like Book Ticket Online, Book Via Agent and Book at Counter all three have <<include>> relationship with Online inquiry and Fill Details. In all these cases one needs to do online inquiry and then filling details. Fill Details further has a dependency <<include>> with Book ticket that again depends on Make Payment. Until and unless payment is made ticket can't be booked.

Again, Cancel Booking Online, Cancel Ticket at Counter and Cancel via Agent all three has a <<include>> dependency with Cancel Ticket and which further <<includes>> Receive Money On Cancellation, and updating database. Make Payment also <<includes>> updating database.

The Usecase UML Diagram for Train Reservation System is shown below:


 Related Articles
 Use Case Diagram Examples

3 comments:

  1. Hi Amit, Thank you for posting a very useful Use case diagram but I have a doubt regarding this. You have drawn a use case "Book a ticket" after "Fill details" use case. I think "Fill details" will have dependency on "Make Payment" first and not directly to "Book Ticket" I am not an expert. Please advice..

    ReplyDelete
    Replies
    1. Hi Ashish,
      Thanks for stopping by. Regarding the use case diagram, a person can make a payment only after he has filled his details and confirmed his ticket booking. So, as far as dependency is concerned in my opinion it is right but again every one has his own perception of analyzing a system. So, the diagram is actually designed to help in getting started with the system, you can always modify it according to your perception and requirements.
      Thanks

      Delete
  2. salam dude,

    please somehow add an extend use case and secondary actor in it..

    Regards

    ReplyDelete