Question: CODE USING C++ LANGUAGE You are a programmer hired by the company ABC which is engaged in the sale of train tickets with various city

CODE USING C++ LANGUAGE

You are a programmer hired by the company "ABC" which is engaged in the sale of train tickets with various city destinations, here are the data:

Ticket Code

Train Name

Destination

Ticket Price (IDR)

Stock

TK001

Gajayana

Cirebon

50000

20

TK002

Bima

Yogyakarta

100000

25

TK003

Argo Bromo

Surabaya

200000

30

The program consists of 3 menus, namely:

1. View the ticket list.

2. Selling tickets.

3. Exit.

When the user selects menu '1', display all items using the "print_item" function, which is a friend function.

When the user selects menu '2', the program asks for ticket code input then displays the details of the ticket code (ticket code, train name, destination, ticket price, and stock). Then the program asks for input on the number of tickets you want to buy. Then the stock will be automatically reduced and the total cost of the purchase will appear (Total Cost = Rate * Number of Orders)

When the user selects menu '3' the program will exit.

CODE USING C++ LANGUAGE

PLEASE ANSWER AS SOON AS POSSIBLE, THANKYOU.

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!