StopwatchLaz

by Daniel Lever: L6 Age ~16

Introduction

Daniel had a great idea for a program based on his sport and he has shown remarkable resilience in developing different versions of it. Using StopwatchLaz you can time up to eight swimmers completing up to four lengths with one of four different strokes. You just press the key of the appropriate lane number each time a length is completed. In addition to displaying the times for each length, the program determines any standard (e.g. Gold, Silver or Bronze) achieved by each swimmer for each length.

The first screenshot shows the offer of a choice of seeing the instructions or using the stopwatch.

Welcome

Welcome

At this point you can click on the icon in the top left of the window to get the drop down menu:

Drop Down Menu

Drop Down Menu

Click on Properties and change the width of the window to 120:

Properties

Properties

The following screenshot shows the instructions in a window with the width already set to 120.

Instructions

Instructions

We tested the program for a butterfly race with six swimmers and obtained the following screenshot.

Butterfly

Butterfly

Download here a zip file containing the code (StopwatchLaz.txt). The program uses the crt unit, so compile it using Lazarus. Daniel has copied and edited code very many times and has used procedures with a parameter to make the code neater. As his confidence grows he will be able to introduce more parameters into his procedures to make them more versatile and thereby tighten his code further.

Click on the link below to see all the code in one large html file. Be prepared for a significant delay if you have a slow system.

Programming - a skill for life!

Student programs to inspire you!