How do we make 2 classes called human and basketball so that the basketball class inherits from the human class, then make 10 objects from the basketball class that are divided between 2 teams A and B using the random method?
The plan is to create 10 basketball objects first, then assign the following player names to each object. Using the random and inheritance method, divide these 10 names between teams A and B and finally print the name of each player with the name of the team in which it is located.
Names of players:
Durant - Antetokounmpo - James - Curry - Harden - Leonard - Jokic - Embiid - Doncic - Davis
Aucun commentaire:
Enregistrer un commentaire