Create a class Team with following attributes:
string TeamName
player [] players;
static int players;
int Win
int Lose
int Draw
1. Create a constructor that accepts an array of Players, team Name.
2. Create a constructor that takes all attributes a parameters except player array.
3. Create a method to add player in team addPlayer(Player objPlayer)
4. Create a method to remove a player from team if it already added in array of players removePlayer(Player objPlayer)
5. Create a method to display team summary displayTeamSummary()
6. Create a program and demonstrate your constrictors and methods
Assalam o Alikum Sir !
ReplyDeleteIn 3rd Line " player[]players " ye kia show kar raha ha ??
What means that Line ??
This comment has been removed by the author.
ReplyDelete@Syed Sami Ur Rehman:
ReplyDeleteIt creates an array of objects of class player, please note that, in my questions I try to avoid code samples, so you need to read arrays from your book first, then use correct syntax.