Answered step by step
Verified Expert Solution
Link Copied!

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 ... 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

Recommended Textbook for

Introduction to Java Programming, Comprehensive Version

Authors: Y. Daniel Liang

10th Edition

133761312, 978-0133761313

More Books

Students also viewed these Programming questions

Question

Factor completely. p(p + 2) + p(p + 2) - 6(p + 2)

Answered: 1 week ago

Question

LC-3 programming. I am trying to write: if (a Answered: 1 week ago

Answered: 1 week ago