struct date
{
int year;
int month;
int day;
};
// TODO - add other supporting structures that could be -
// used as types for members of the two main structures below
{
int hour;
int minute;
};
struct trainer_t
{
char name[50];
int starts;
int wins;
int places;
int shows;
};
struct fraction
{
int nominator;
int denominator;
};
struct topFinisher
{
char horseName[50];
float weightCarried;
float margin;
};
struct claimingInformation_t
{
char newOwner[50];
char previousOwner[50];
};
struct workoutLines_t
{
struct date dateOfWorkout;
char trackName[50];
float trackDistance;
char trackCondition[50];
struct time lengthOfWorkout
; char breezingOrHandly[50];
struct fraction rank;
};
struct raceCondition_t
{
float purse;
char descriptionOfRace[50];
char ageRestriction[50];
float weightAssignments;
char claimingCondition[50];
float raceDistance;
};
struct trackRecordHolder_t
{
char name[50];
int age;
float weightCarried;
int starts;
int wins;
int places;
int shows;
};
struct totalsAtTrack_t
{
char atThisTrack[50];
int starts;
int wins;
int place;
int show;
int speedFigure;
int earnings;
};
struct totalsAtDistance_t
{
char distanceSurfaceRecord[50];
int starts;
int wins;
int place;
int show;
int speedFigure;
int earnings;
};
// add a structure to store details on each race
// define symbolic constants for string length - not 50 or 200 etc
struct race_details
{
struct date raceDate; // A - the date of the race
struct time raceTime
; //A - time of race char wagersAvailable[50]; //B
int raceNumber; // C - the specific race number identifier
char trackName[50]; // E - the name of the track where the race was held
unsigned char trackDiagram[10000]; //D
unsigned char QRCode [5000]; //F
int raceRating; //G
unsigned char notes[100]; //H
char raceType[50]; //I, 26
struct raceCondition_t raceCondition; //J
struct trackRecordHolder_t trackRecordHolder; //K
unsigned char videoCameraIcon; //16
char raceDateLink[50]; //16
char trackCode[50]; //17
char trackCondition[50]; //18
unsigned char trackSurface; //19
char raceDistance[50]; //20 //prob should be enum
float fractionalTimes; //22
int ageResctriction; //23
struct topFinisher topThreeFinishers [3]; //36
char footnotes[100]; //37
int numberOfHorses; //38
struct claimingInformation_t claimingInformation; //39
};
// add a structure to store details on each horse
struct horse_details_and_past_performance
{
int programNumber; // 1 - the program number
char horseName[50]; // 8 - horse name
char horseGender; // 10 - gender of the horse
char saddleClothColor[50]; //2
struct fraction morningOddLines; //3
float claimingPrice; //4
char owner[50]; //5
char silks[50]; //6
struct trainer_t trainer; //7
char medication; //9, 34
char equipment; //9, 34
char horseColor[5]; //10
int age; //10
char sire[50]; //10
char dam[50]; //10
float weightCarried; //11, 33
struct trainer_t jockey; //12, 32
int horseClassFigure; //13
struct totalsAtTrack_t totalsAtTrack; //14
struct totalsAtDistance_t totalsAtDistance; //15
int daysUnraced; //21
char restrictedToFillies; //24
char restrictedToStateBredHorses; //25
int equibasePaceFigures; //27
int speedFigure; //28
int postPosition; //29
float calls; //30
float finalPosition; //31
float finalOdds; //35
struct workoutLines_t workoutLines; //40
};
int main ( )
{
// NOTE: You don't have to populate any of these!!!
struct race_details myRaces[10];
struct horse_details_and_past_performance myHorses[20];
// nothing else needs to be added to main
return (0);
};