CS案例之Need use Microsoft visual studio
当前位置:以往案例 > >CS案例之Need use Microsoft visual studio
2017-08-17

project 2

Problem:
Design a class that can be used to keep score information for a rugby team using TDD.


Requirements:

//Team object constructor

public Team(string newTeamName) { }


//Get and Set the name public string Name { }


//Team's total score for the game public int TotalScore { }


//Team's number of Try in the game public int ScoreTry { }


//Team's number of Convert in the game public int ScoreConvert { }


//Team's number of Pentry in the game public int ScorePenaltyKick { }


//Team's number of Drop Kick in the game public int ScoreDropKick { }


//To add and count the try (5 points) score for the Team public void AddTryScore() { }


//To add and count the conversion (2 points) score for the Team public void AddConversionScore() { }

//To add and count the penalty kick kick (3 points) score for the Team public void AddPenaltyKickScore() { }

//To add and count the drop kick (3 points) score for the Team public void AddDropKickScore() { }


Note:
The four possible Rugby scores are a try (5 points), a conversion (2 points), a drop kick (3 points) or a penalty kick (3 points). The class should keep track of the scores for each team as well as each individual score.


You should have at least two projects: one is a Unit Test Project (.NET Framework) project and another one is a Class Library (.NET Standard) project.


You might need to add private variables when you develop this class. Employ good programming principles discussed in class.



在线提交订单