Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Create an application in C for simple Train Ticket Booking application. The application has three modules namely, User Account creation/ User Registration module, Ticket Booking

Create an application in C for simple Train Ticket Booking application. The application has three modules namely, User Account creation/ User Registration module, Ticket Booking module and Seat Availability checking module with the following specifications: User Account creation module: 1. Creates user account which has two types, Personal or Travel agency. 2. There is a limit of maximum number of tickets that can be purchased using personal account. Not more than 10 tickets can be purchased. 3. Travel agents can purchase a maximum of 100 tickets at a time. 4. Write simple functions to represent the user with one of these accounts. Ticket Booking module: 1. The module gets the type of user and the user needs to be a registered one. (User data can be hard coded in the program and used for verification), 2. Get the details like class required namely AC (2 tyre / 3 tyre), Second class with or without berth and unreserved with different ratings for each. 3. Get the number of tickets required and the user details (Gender, Age, etc) and calculate the amount and generate the ticket in a neat format. Seat availability Module : 1. The system accepts the users name and password and displays a menu. 2. A menu with options to get train number, place of departure and destination details from the user. 3. Display the suitable trains and seat availability according to the class. The class details and ticket availability details can be hard coded in the program. 4. Use simple functions with formatted output for printing the details. Instructions Use simple variables and functions for creating the application. Create appropriate header files with required functions for the three modules. Call these from the main function using a menu driven execution with suitable prompts for user input. User account details, seat class details and other data need not be stored. Use constant values (global variables) for variables wherever necessary and get input from user only if required. Print appropriate messages to indicate the function called. For example, if the account creation function is called, ask the user to input name, use simple initialized variables for user name and password. Write print statement that displays the above details and a message stating your account is created.

Expected submissions: A zipped file which contains 1. The header files for the three modules. 2. The code file which contains the main method.

3. A word file with instructions for executing the Train ticket applications and your initial assumptions about the system for creating the application.

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Students also viewed these Databases questions