Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Define a class named TRAIN. Include following members: Data members :- - Train Number - Name of the train - Starting station - Arrival station
Define a class named TRAIN. Include following members:
Data members :-
- Train Number
- Name of the train
- Starting station
- Arrival station
- Departure time
- Arrival time
- Off-day
Member functions
- To initialize members
- To input train details
- To display data
Once you have written the class, write a program that creates four TRAIN objects and stores the following data in them. TRAIN NAME OF THE OFF-DAY STARTING DEPARTURE ARRIVAL ARRIVAL NO TRAIN STATION TIME STATION TIME 702 SUBARNA FRIDAY DHAKA 16:30 CHATTOGRAM 21:50 EXPRESS 704 MAHANAGAR NO DHAKA 07:45 CHATTOGRAM 14:00 PROVATI 705 TUESDAY DHAKA 10:10 DINAJPUR 21:00 EXPRESS 709 PARABAT TUESDAY DHAKA 06:20 SYLHET 13:00 EXPRESS
Step by Step Solution
★★★★★
3.45 Rating (155 Votes )
There are 3 Steps involved in it
Step: 1
Note This is c program you can not create class in C include include include stdiota using namespace ...Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started