public static Competitor AddAmateurCompetitor(string inID, string inName, string inAddress, string inAge, string inScore) //Makes our amateur competitor. { newSkiNumber = newSkiNumber + 1; //Increments the competitor number by 1. string newCompetitorNumberString = newSkiNumber.ToString(); //Turns that int into a string. Amateur newAmateur = new Amateur(inID, inName, newCompetitorNumberString, inAddress, inAge, inScore); //Calls the amateur constructor in the Competitor Class. skiCompetitors.Add(newCompetitorNumberString, newAmateur); //Adds the competitor to the dictionary. Income = Income + 100; //Amateurs have to pay £100. return(newAmateur); //Returns the amateur. }
public void EditAmateur(string inID, string inName, string inNumber, string inAddress, string inAge, string inScore) //Saves the edited comepetitor data. { Amateur EditedAmateur = new Amateur(inID, inName, inNumber, inAddress, inAge, inScore); //Creates a new amateur called "EditedAmateur" skiCompetitors[inNumber] = EditedAmateur; //Saves the new inforamtion too the dictionary. }