Design BDTeam class and AusTeam class which inherit from CricketTeam class  so that the following code provides the expected output. You can not change any of the given code. Do not modify the given parent  class. Note: add_player() method in both child classes should work for any number of  parameters and assume parameters will be even numbers. class CricketTeam:    def __init__(self, name, ranking, continent):      self.name = name      self.ranking = ranking      self.continent = continent    def add_player(self, *info):      pass    def __str__(self):      s = f"Name: {self.name}\nRanking: {self.ranking}\nContinent:  {self.continent}"      return s # Write your codes here. # Do not change the following lines of code. bangladesh = BDTeam("Bangladesh", 7, "South Asia", 1) bangladesh.add_player("Mustafiz", "Bowler", "Mashrafee", "Bowler", "Shakib", "All  Rounder", "Tamim", "Batter", "Mahmudullah", "Batter") print('1.------------------------------------') print(bangladesh.asia_cup_status()) print('2.------------------------------------') print(bangladesh) print('3.====================================') australia = AusTeam("Australia", 3, "Oceania", 5) australia.add_player("Batter", "Smith", "All  Rounder", "Marsh", "Batter", "David", "Bowler", "Starc", "Bowler", "Hazlewood") print('4.------------------------------------') print(australia.world_cup_status()) print('5.------------------------------------') print(australia) OUTPUT: 1.------------------------------------ Hurray!!! Bangladesh has won 1 Asia Cups!!! 2.------------------------------------ Country Details: Name: Bangladesh Ranking: 7 Continent: South Asia Asia Cup Win:1 Players: Bowler: ['Mustafiz', 'Mashrafee'] All Rounder: ['Shakib'] Batter: ['Tamim', 'Mahmudullah'] 3.==================================== 4.------------------------------------ Hurray!!! Australia has won 5 World Cups!!! 5.------------------------------------ Country Details: Name: Australia Ranking: 3 Continent: Oceania World Cup Win:5 Players: Batter: ['Smith', 'David'] All Rounder: ['Marsh'] Bowler: ['Starc', 'Hazlewood']

Computer Networking: A Top-Down Approach (7th Edition)
7th Edition
ISBN:9780133594140
Author:James Kurose, Keith Ross
Publisher:James Kurose, Keith Ross
Chapter1: Computer Networks And The Internet
Section: Chapter Questions
Problem R1RQ: What is the difference between a host and an end system? List several different types of end...
icon
Related questions
Question

Design BDTeam class and AusTeam class which inherit from CricketTeam class 
so that the following code provides the expected output.
You can not change any of the given code. Do not modify the given parent 
class.
Note:
add_player() method in both child classes should work for any number of 
parameters and assume parameters will be even numbers.

class CricketTeam:
   def __init__(self, name, ranking, continent):
     self.name = name
     self.ranking = ranking
     self.continent = continent

   def add_player(self, *info):
     pass

   def __str__(self):
     s = f"Name: {self.name}\nRanking: {self.ranking}\nContinent: 
{self.continent}"
     return s

# Write your codes here.
# Do not change the following lines of code.
bangladesh = BDTeam("Bangladesh", 7, "South Asia", 1)
bangladesh.add_player("Mustafiz", "Bowler", "Mashrafee", "Bowler", "Shakib", "All 
Rounder", "Tamim", "Batter", "Mahmudullah", "Batter")
print('1.------------------------------------')
print(bangladesh.asia_cup_status())
print('2.------------------------------------')
print(bangladesh)
print('3.====================================')
australia = AusTeam("Australia", 3, "Oceania", 5)
australia.add_player("Batter", "Smith", "All 
Rounder", "Marsh", "Batter", "David", "Bowler", "Starc", "Bowler", "Hazlewood")
print('4.------------------------------------')
print(australia.world_cup_status())
print('5.------------------------------------')
print(australia)

OUTPUT:
1.------------------------------------
Hurray!!! Bangladesh has won 1 Asia Cups!!!
2.------------------------------------
Country Details:
Name: Bangladesh
Ranking: 7
Continent: South Asia
Asia Cup Win:1
Players:
Bowler: ['Mustafiz', 'Mashrafee']
All Rounder: ['Shakib']
Batter: ['Tamim', 'Mahmudullah']
3.====================================
4.------------------------------------
Hurray!!! Australia has won 5 World Cups!!!
5.------------------------------------
Country Details:
Name: Australia
Ranking: 3
Continent: Oceania
World Cup Win:5
Players:
Batter: ['Smith', 'David']
All Rounder: ['Marsh']
Bowler: ['Starc', 'Hazlewood']

OUTPUT:
1.-
Hurray!!! Bangladesh has won 1 Asia Cups!!!
2.
Country Details:
Name: Bangladesh
Ranking: 7
Continent: South Asia
Asia Cup Win:1
Players:
Bowler: ['Mustafız', 'Mashrafee']
All Rounder: ['Shakib']
Batter: ['Tamim', 'Mahmudullah']
3.=
4.
Hurray!!! Australia has won 5 World Cups!!!
5.-
Country Details:
Name: Australia
Ranking: 3
Continent: Oceania
World Cup Win:5
Players:
Batter: ['Smith', 'David']
All Rounder: ['Marsh']
Bowler: ['Starc', 'Hazlewood']
Transcribed Image Text:OUTPUT: 1.- Hurray!!! Bangladesh has won 1 Asia Cups!!! 2. Country Details: Name: Bangladesh Ranking: 7 Continent: South Asia Asia Cup Win:1 Players: Bowler: ['Mustafız', 'Mashrafee'] All Rounder: ['Shakib'] Batter: ['Tamim', 'Mahmudullah'] 3.= 4. Hurray!!! Australia has won 5 World Cups!!! 5.- Country Details: Name: Australia Ranking: 3 Continent: Oceania World Cup Win:5 Players: Batter: ['Smith', 'David'] All Rounder: ['Marsh'] Bowler: ['Starc', 'Hazlewood']
Question 3:
Design BDTeam class and AusTeam class which inherit from
CricketTeam class
so that the following code provides the expected output.
You can not change any of the given code. Do not modify the given
parent
class.
Note:
add_player() method in both child classes should work for any number
of
parameters and assume parameters will be even numbers.
class CricketTeam:
def _init_(self, name, ranking, continent):
self.name = name
self.ranking = ranking
self.continent
%3D
= continent
def add_player(self, *info):
pass
def _str_(self):
s= f"Name: {self.name}\nRanking: {self.ranking}\nContinent:
{self.continent}"
return s
# Write your codes here.
# Do not change the following lines of code.
bangladesh = BDTeam("Bangladesh", 7, "South Asia", 1)
bangladesh.add_player("Mustafiz", "Bowler", "Mashrafee", "Bowler",
"Shakib", "All
Rounder", "Tamim", "Batter", "Mahmudullah", "Batter")
print('1.
print(bangladesh.asia_cup_status())
print('2.-
print(bangladesh)
print('3.=:
australia = AusTeam("Australia", 3, "Oceania", 5)
australia.add_player("Batter", "Smith", "All
Rounder", "Marsh", "Batter", "David", "Bowler", "Starc", "Bowler",
"Hazlewood")
print('4.-
print(australia.world_cup_status(0)
print('5.-
print(australia)
->
===')
Transcribed Image Text:Question 3: Design BDTeam class and AusTeam class which inherit from CricketTeam class so that the following code provides the expected output. You can not change any of the given code. Do not modify the given parent class. Note: add_player() method in both child classes should work for any number of parameters and assume parameters will be even numbers. class CricketTeam: def _init_(self, name, ranking, continent): self.name = name self.ranking = ranking self.continent %3D = continent def add_player(self, *info): pass def _str_(self): s= f"Name: {self.name}\nRanking: {self.ranking}\nContinent: {self.continent}" return s # Write your codes here. # Do not change the following lines of code. bangladesh = BDTeam("Bangladesh", 7, "South Asia", 1) bangladesh.add_player("Mustafiz", "Bowler", "Mashrafee", "Bowler", "Shakib", "All Rounder", "Tamim", "Batter", "Mahmudullah", "Batter") print('1. print(bangladesh.asia_cup_status()) print('2.- print(bangladesh) print('3.=: australia = AusTeam("Australia", 3, "Oceania", 5) australia.add_player("Batter", "Smith", "All Rounder", "Marsh", "Batter", "David", "Bowler", "Starc", "Bowler", "Hazlewood") print('4.- print(australia.world_cup_status(0) print('5.- print(australia) -> ===')
Expert Solution
steps

Step by step

Solved in 2 steps with 1 images

Blurred answer
Recommended textbooks for you
Computer Networking: A Top-Down Approach (7th Edi…
Computer Networking: A Top-Down Approach (7th Edi…
Computer Engineering
ISBN:
9780133594140
Author:
James Kurose, Keith Ross
Publisher:
PEARSON
Computer Organization and Design MIPS Edition, Fi…
Computer Organization and Design MIPS Edition, Fi…
Computer Engineering
ISBN:
9780124077263
Author:
David A. Patterson, John L. Hennessy
Publisher:
Elsevier Science
Network+ Guide to Networks (MindTap Course List)
Network+ Guide to Networks (MindTap Course List)
Computer Engineering
ISBN:
9781337569330
Author:
Jill West, Tamara Dean, Jean Andrews
Publisher:
Cengage Learning
Concepts of Database Management
Concepts of Database Management
Computer Engineering
ISBN:
9781337093422
Author:
Joy L. Starks, Philip J. Pratt, Mary Z. Last
Publisher:
Cengage Learning
Prelude to Programming
Prelude to Programming
Computer Engineering
ISBN:
9780133750423
Author:
VENIT, Stewart
Publisher:
Pearson Education
Sc Business Data Communications and Networking, T…
Sc Business Data Communications and Networking, T…
Computer Engineering
ISBN:
9781119368830
Author:
FITZGERALD
Publisher:
WILEY