Documenti di Didattica
Documenti di Professioni
Documenti di Cultura
The admin
should be able to add new, update, delete and view the trains. The admin can add new
trains by providing the details like Train No, Train Name, Source Station, Destination
Station, Departure Time, Arrival Time, No. of Coaches and Fare. The admin of the system
can also view a particular train details, and modify them.
1. Design a Train class with the following fields:
i. Train No (5 digit Unique number)
ii. Train Name
iii. Source Station
iv. Destination Station
v. Departure Time
vi. Arrival Time
vii. No. of Coaches
viii. Fare
2. Design an Interface for Railway Management as IRailway with the following
members:
i. Long AddTrainDetails(Train t)
ii. Train FindTrain(long TrainNo)
iii. List<Train> ViewTrainDetaisl()
3. Create a class IndianRailway to implement IRailway.
i.
ii.
iii.
Train_Details
TrainNumber numeric(5) not null Identity(10001,1)
TrainName varchar(40) not null
Source Station varchar(40) not null
Source_Departure_Time varchar(10)
Destination Station varchar(40) not null
Destination_Arrival_Time varchar(10)
Number of Coaches int check value between 0 and 200
Fare money check fare is above 1 and below 2000
ii.
NumberOf
coaches
20
Fare
11:45 Am
20
280
09:50 Pm
20
280
09:40 Am
15
320
11:50 Pm
Secunderab
ad Jn
Vijayawada
Jn
Kakinada
Port
Puducherry
06:45 Pm
20
450
New Delhi
10:10 Pm
Lucknow Nr
06:45 Am
25
480
Gaya Jn
02:30 Pm
New Delhi
05:00 Am
15
350
Allahabad
Jn
09:30 Pm
New Delhi
06:55 Am
12
TrainNo
TrainName
Source
Station
Source
Dep. Time
Destination
Station
12590
Gorakhpur
Express
Satavahana
Exp
Satavahana
Exp
Circar
Express
Ndls Pdy Exp
Secunderab
ad Jn
Vijayawada
Jn
Secunderab
ad Jn
Chennai
Egmore
New Delhi
07:20 Am
Gorakhpur
06:10 Am
Lucknow
Mail
Mahabodhi
Exp
Prayag Raj
Exp
12713
12714
17643
22404
12230
12397
12417
04:15 Pm
05:20 Pm
300
397
h) Create a Procedure which takes Train Number as input and should return the
corresponding Train Name and Total Fare using output parameters.
i) Create a procedure to insert train details into Train_Details table.
Instructions:
TO UPLOAD: Copy all SQL Script Files and C# Project File along with its .CS files to a
folder, Zip the folder and then upload it into iON.
All DB tables should prefix with tbl and suffix with _EmployeeID (Ex:
tblTrain_432123) and Stored Procedures prefix with usp_ and suffix with
_EmployeeID (Ex: usp_FindTrain_432123)