Using Class in C++ answer the following question. There is a Ground class that keeps ground name and city. There is another class Game, that holds information game name and date of game on which the game will be played. The Player class keeps information of a Player, name and code. There is Team class that holds team name and total number of players count. In cricket game, a team can have 11 players including 1 captain. The Game will be played between 2 teams in a ground. No player can play game without a team in the ground. And no game can be played without a ground’s information. Design it using any possible type of Inheritance. Input information for a game of 2 teams, and display the following: Ground name City Game Team1 Team2 Captain1 Captain2.
Using Class in C++ answer the following question.
There is a Ground class that keeps ground name and city. There is another class Game, that holds information game name and date of game on which the game will be played. The Player class keeps information of a Player, name and code. There is Team class that holds team name and total number of players count.
In cricket game, a team can have 11 players including 1 captain. The Game will be played between 2 teams in a ground. No player can play game without a team in the ground. And no game can be played without a ground’s information.
Design it using any possible type of Inheritance. Input information for a game of 2 teams, and display the following:
Ground name City Game Team1 Team2 Captain1 Captain2.
Step by step
Solved in 5 steps