The George Washington University
School of Engineering and Applied Science
Department of Electrical Engineering and Computer Science
CSci 131 -- Data Structures
Lab #1
For labs meeting on January 22, 1998

This 3-part lab exercise will make sure you are able to print files on the lab printers, and give you a bit of experience in understanding and modifying some relatively simple Ada 95 programs.

Part I. Printing hard copy in the lab.

All you need to do here is print a copy of your survey form.

Part II. Modifying Time_Of_Day.

Copy, compile, and run the program programs51/time_of_day.adb.

Now modify the program so that the time is displayed in AM/PM form instead of 24-hour form. That is, 3:00:00 will be displayed as 3:00:00 AM, and 15:00:00 will be displayed as 3:00:00 PM.

Part III. Modifying World_Time

Copy, compile, and run the program programs131/world_time.adb. Now do exercise 3, p.48, in the Data Structures text. This reads:

3. The World_Time program presented in Section 1.11 has a limitation: The array of time-zone offsets must be completely redefined if the program user is not in the Eastern U.S. time zone. In many applications, time-zone offsets are computed with respect to Greenwich Mean Time, often referred to as GMT or Zulu. This is the local time in Greenwich, England. Modify World_Time so that Zulu is used as the "zero point" for the offsets. (Encyclopedias and almanacs usually describe the various official time zones around the world; so do amateur radio guides.) Because a computer's clock normally reports only local time, your program will need to find out from the user in which time zone he or she is located before it can compute the time elsewhere.

NOTE: The Eastern time zone in the United States is 5 hours earlier than Zulu (sometimes referred to as GMT-5).