Write a C++ program to keep records of Train Trips as following:

To get the Solution, drop an email at [email protected]
Please feel free to send us your queries at: [email protected]
Problem Statement

Write a C++ program to keep records of Train Trips as following: 3 – Use a structure called Trip that contains main information of a trip (ID, month, year, duration, and price). struct Trip\{ string ID; int month, year, duration; double price; } ; – Create a function called void check_trip_date(Trip \&t), which receives a reference of struct Trip as a parameter, this function checks if the trip date is valid or not. In case the date was invalid, keep asking the user to re-enter valid date. (1 mark) Note: A date should consist of a valid value for the month (1-12) and the year should not be earlier than 2023. – Create a function called void print_trips(Trip t[], int *duration), which prints the prices of all trips with duration less than the received duration. ( 1 mark) Note: Display an appropriate message when no trips are found. – In main function, create an array of the structure Trip and store only 2 elements in it by asking the user to enter the trip information and check the date of each trip. Then print the trips based on the duration entered by the user. ( 1 mark)

To get the Solution, drop an email at [email protected]
Please feel free to send us your queries at: [email protected]