s = #of wicket * 1000 Century Bonus = #of century * 1000 addPlayerWithWickets and addPlayerWithCenturies methods should work any  number of parameters assuming that the parameter number will be an even  number and greater than 1.

Database System Concepts
7th Edition
ISBN:9780078022159
Author:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Chapter1: Introduction
Section: Chapter Questions
Problem 1PE
icon
Related questions
Question

write a python code and finish it within 20 minutes please

 

????????:
Design Australia class and England class which inherit from Cricket class 
so that the following code provides the expected output.

Note:
Wicket Bonus = #of wicket * 1000
Century Bonus = #of century * 1000
addPlayerWithWickets and addPlayerWithCenturies methods should work any 
number of parameters assuming that the parameter number will be an even 
number and greater than 1.

class Cricket:
     total_player = 0

     def __init__(self, name, number):
         self.name = name
         self.number = number

     def __str__(self):
         s =  "Name: "+self.name+", World Cup: "+self.number
         return s

# Write your codes here.
# Do not change the following lines of code.
s1 = Australia("Australia", "5")
print("==============================")
s1.addPlayerWithWickets("Starc", 4,  "Hazlewood", 3)
print("==============================")
print(s1)
print("==============================")
s2 = England("England", "1")
print("==============================")
s2.addPlayerWithCenturies("Root", 5, "Ali", 3, "Woakes", 3)
print("==============================")
print(s2)
print("==============================")
print("Total Players:", Cricket.total_player)

OUTPUT:
Australia has won world cups 5 time(s)
==============================
==============================
Name: Australia, World Cup: 5
Total Player(s): 2
Player Details:
Name: Starc, Wicket Bonus: 4000$
Name: Hazlewood, Wicket Bonus: 3000$
==============================
England has won world cups 1 time(s)
==============================
==============================
Name: England, World Cup: 1
Total Player(s): 3
Player Details:
Name: Root, Century Bonus: 5000$
Name: Ali, Century Bonus: 3000$
Name: Woakes, Century Bonus: 3000$
==============================
Total Players: 5

Expert Solution
steps

Step by step

Solved in 4 steps with 4 images

Blurred answer
Knowledge Booster
Developing computer interface
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Similar questions
  • SEE MORE QUESTIONS
Recommended textbooks for you
Database System Concepts
Database System Concepts
Computer Science
ISBN:
9780078022159
Author:
Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:
McGraw-Hill Education
Starting Out with Python (4th Edition)
Starting Out with Python (4th Edition)
Computer Science
ISBN:
9780134444321
Author:
Tony Gaddis
Publisher:
PEARSON
Digital Fundamentals (11th Edition)
Digital Fundamentals (11th Edition)
Computer Science
ISBN:
9780132737968
Author:
Thomas L. Floyd
Publisher:
PEARSON
C How to Program (8th Edition)
C How to Program (8th Edition)
Computer Science
ISBN:
9780133976892
Author:
Paul J. Deitel, Harvey Deitel
Publisher:
PEARSON
Database Systems: Design, Implementation, & Manag…
Database Systems: Design, Implementation, & Manag…
Computer Science
ISBN:
9781337627900
Author:
Carlos Coronel, Steven Morris
Publisher:
Cengage Learning
Programmable Logic Controllers
Programmable Logic Controllers
Computer Science
ISBN:
9780073373843
Author:
Frank D. Petruzella
Publisher:
McGraw-Hill Education