/// <summary> /// Parametrerized Constructor /// </summary> /// <param name="team1">Abbr of Team 1</param> /// <param name="team2">Abbr of Team 2</param> /// <param name="firstPlacePts">Data for 1st place</param> /// <param name="secondPlacePts">Data for 2nd place</param> /// <param name="totalPts">Total points for this event by both teams</param> public RelayEvent(string team1, string team2, EventPoints firstPlacePts, EventPoints secondPlacePts, decimal team1Total, decimal team2Total) { points = new EventPoints[2]; this.team1 = team1; this.team2 = team2; points[0] = firstPlacePts; points[1] = secondPlacePts; this.team1Total = team1Total; this.team2Total = team2Total; }
/// <summary> /// Default Constructor /// </summary> public RelayEvent() { points = new EventPoints[2]; team1 = ""; team2 = ""; points[0] = new EventPoints(0.0m, 0.0m, "", "", ""); points[1] = new EventPoints(0.0m, 0.0m, "", "", ""); team1Total = 0; team2Total = 0; }
/// <summary> /// Constructor without points /// </summary> /// <param name="team1">Abbr of Team1</param> /// <param name="team2">Abbr of Team2</param> public IndEvent(string team1, string team2) { points = new EventPoints[3]; this.team1 = team1; this.team2 = team2; this.points[0] = new EventPoints(0.0m, 0.0m, "", "", ""); this.points[1] = new EventPoints(0.0m, 0.0m, "", "", ""); this.points[2] = new EventPoints(0.0m, 0.0m, "", "", ""); this.team1Total = 0.0m; this.team2Total = 0.0m; }
/// <summary> /// Default Constructor /// </summary> public IndEvent() { points = new EventPoints[3]; team1 = ""; team2 = ""; points[0] = new EventPoints(0.0m, 0.0m, "", "", ""); points[1] = new EventPoints(0.0m, 0.0m, "", "", ""); points[2] = new EventPoints(0.0m, 0.0m, "", "", ""); team1Total = 0.0m; team2Total = 0.0m; }
/// <summary> /// Tests whether or not two EventPoints objects are equal to one another /// </summary> /// <param name="obj">obj being tested</param> /// <returns>True if the EventPoints objects are equal, false if they are not</returns> public override bool Equals(object obj) { EventPoints myEventPoints = obj as EventPoints; if (myEventPoints == null && this == null) { return(true); } else if (myEventPoints != null && this == null) { return(false); } else if (myEventPoints == null && this != null) { return(false); } else if (myEventPoints.team1Pts != team1Pts) { return(false); } else if (myEventPoints.team2Pts != team2Pts) { return(false); } else if (myEventPoints.athleteName != athleteName) { return(false); } else if (myEventPoints.schoolName != schoolName) { return(false); } else if (myEventPoints.performance != performance) { return(false); } return(true); }