Programming Assignment #1

Please write the following programs in Delphi.

  1. Write a program that has a button. When the button is pressed the button's caption is changed to "Hello World".
  2. Write a program that has two buttons and a label. One button's caption is "Hello" and the other's is "Good-Bye". When the Hello button is pressed the Label should read "Hello" and when the Good-Bye button is pressed the Label should read "Good-Bye".
  3. Write a program that simulates a traffic light using buttons and shapes. There should be three circles colored Red, Yellow, and Green. Each button should correspond with one of the circles. When the button is pressed the light should turn on.
  4. Using the program from question number three as a template (save under a new name) add a timer to the program to allow the lights to change with no human interaction.
  5. Add to question number four (save under a new name) graphics to represent an intersection. At very least you should have four stop lights that work in harmony with each other. You may also add roads, cars, and pedestrians ... be creative.

 Get Firefox!

©2003 C. Whittington