I’m trying to find out how to code that is about dog competition. Several dogs have been entered in a competition. The dogs will run a selected course (either Jumpers, Gamblers, or Titling) and are timed. Any penalties are recorded in additional seconds and added to the dog’s course time to get their total time.
A data file (dogs.txt) contains information about the dogs. Each dog record has these fields:
– running time in seconds
– dog’s total penalty in seconds
– course code
A data file (courses.txt) contains information about the courses. Each course record has these fields:
– maximum time
I need interactive, menu driven application that will do the following:
· allow the user to print a report of a specific course The report should consist of a list of the dogs that ran that particular course. The report should have appropriate headings (including the current date). Each detail line of the report should show the name of the dog, running time, penalty faults, total time and amount of total time over or under the course time. A summary of the winning dog and the dog with the most penalties should be printed at the bottom of the report.
- allow the user to add a dog to the data file. Before the dog is added, the data entered by the user must be validated according to the following rules:
ID of dog: digit, letter, 3 digits
Run time: number > 0
Penalties: number > 0
I’m trying to figure out how to do it, but Im only able to do just part of it.