Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

You are given a text file that contains the timetable for buses that travel a college campus. The first line of the file contains the

You are given a text file that contains the timetable for buses that travel a college campus. The first line of the file contains the name for each stop on the bus system separated by colons. Each following line contains the times using a 24-hour clock at which each bus in the system will arrive at a bus stop, also separated by colons. A sample file is attached to this problem.

Write a program in Perl that reads this file and outputs a row for each bus stop, showing the times when a bus arrives at that stop.

Sample data file:

Edinburgh:Danderhall:Dalkeith:Edgehead:Pathhead:Blackshiels:Oxton:Carfraemill:Lauder:Earlston:Leaderfoot:Newtown St Boswells:St Boswells:Clintmains:Kelso

0850:0911:0918:0930:0933:0939:0953:0955:1001:1015:1025:1029:1032:1038:1055

1150:1211:1218:1230:1233:1239:1253:1255:1301:1315:1325:1329:1332:1338:1355

1350:1411:1418:1430:1433:1439:1453:1455:1501:1515:1525:1529:1532:1538:1555

1610:1633:1640:1652:1655:1701:1715:1717:1723:1737:1746:1750:1753:1803:1820

1750:1811:1818:1830:1833:1839:1853:1855:1901:1919:1925:1929:1932:1938:1955

2000:2021:2028:2037:2040:2046:2100:2102:2108:2121:2126:2130:2133:2138:2155

Step by Step Solution

There are 3 Steps involved in it

Step: 1

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

Database Design And SQL For DB2

Authors: James Cooper

1st Edition

1583473572, 978-1583473573

More Books

Students also viewed these Databases questions

Question

1. What is nonverbal communication?

Answered: 1 week ago