This assignment offers practice in OO thinking and in the application of Java technologies. The first exercise involves OO analysis and writing UML.

computer science

Description

Introduction 

This assignment offers practice in OO thinking and in the application of Java technologies. The first exercise involves OO analysis and writing UML. The second, third and fourth involve constructing OO programs in Java (i.e. writing class declarations that define types of object that contain other objects), expanding the repertoire of technologies to include arrays, and ‘static’ variables and methods (class members). The second exercise is the last in our evolving Car Park simulation. The third and fourth concern construction of a simple guessing game called “Cows and Bulls”.


Scenario 

The Western Province Athletics Association (WPAA), founded in 1965, organises road running races throughout the year. The name, type, date, time and location of each race is published in advance. Sometimes races share a date, but they never occur on the same date and in the same location.


In the world of road racing, multi day ultra-marathons of 4800 kilometres or more are not unknown. The longest race that the WPAA hosts is 100 kilometres. The shortest is 5 kilometres. The most common are 10km races and half marathons (21.097km). Races are only open to association members. (You must be 14 years or older to join.) Further, entry to a race may be restricted to athletes who, based on the results of previous races, can run the distance within a certain time. At a WPAA race, timing begins when the starting gun is fired and ends when the race completes: when (a) a predefined 'cut off' time is reached or (b) all athletes have crossed the finish line. Cut off time depends on the type of race (marathon, half-marathon, or whatever). Times are recorded down to hundredths of seconds. For identification purposes each competitor wears a race bib bearing a unique number. Bib numbers are in the range 99 to 9999 inclusive and are assigned on a per race basis. Up to two times are recorded to calculate each athlete’s race result: their finishing time, naturally, but also the time, according to the race clock, at which they cross the start line. Depending on the size of the race, an individual can experience a significant delay. The two timings enable the actual or 'net time' for the distance to be determined. Though the ranking of finalists is based solely on finishing time, known as 'gun time', net time, as a more accurate measure of performance, is useful to the athletes themselves. It is also used in the context of restricted entry races to identify athletes that qualify. When the WPAA publishes the results of a race on their website they give the gun time, bib number, athlete name and age. To this end, the WPAA keeps a record of each member’s name, address AND date of birth. 


Related Questions in computer science category