Question: Write a complete bash script to print a train travel ticket. ( YOU MUST INCLUDE THE SCRIPT FILE ( . sh file ) IN THE
Write a complete bash script to print a train travel ticket.
YOU MUST INCLUDE THE SCRIPT FILE sh file IN THE ZIP
Here are the criteria......
a The script MUST CONTINUE in a loop until user decides to stop. User stops the ticket printing by entering
b A city offers types of train services to different destinations. The chart below shows the options.
The code names used for these destinations are and Code names used for the two services are for
Express and for standard.
c User enters the destination or service or and the number of people traveling.
Based on the information user entered, a ticket is printed Just one ticket, no matter how many people traveling
in the group
PS: If the user enters unknown options, show error messages Look at the screen dump below
d Script must run a menu as follows:
New City Transit Authority Print Your Travel Ticket
Enter Destination AB or to quit:
Service Type E or S:
Enter number of travelers:
Script must produce the calculated result as shown in screen dumps below:
New City Transit Authority Print Your Travel Ticket
Enter Destination or to quit:
Service Type or :
Enter number of travelers:
New City Transit Authority Print Your Travel Ticket
Destination :
Service Type :
Number of travelers :
Ticket Price a: $
New City Transit Authority Print Your Travel Ticket
Enter Destination or to quit:
Service Type or :
Enter number of travelers:
Sorry, number of travelers must be or more!
New City Transit Authority Print Your Travel Ticket
Enter Destination AB or to quit:
Service Type or :
Enter number of travelers:
Sorry unknown Destination!
New City Transit Authority Print Your Travel Ticket
Enter Destination or to quit:
Service Type or : D
Enter number of travelers:
Sorry unknown Service Type!
New City Transit Authority Print Your Travel Ticket
Enter Destination AB or to quit:
Service Type or :
Enter number of travelers:
Important!! Print Your Name
User entered correct values
User entered for
Destination. Quit the
application
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
