Implement the design of the Batsman class so that the following output is produced: Hint Batting strike rate (s/r) = runsScored / ballsFaced x 100. Driver Code Output # Write your code here b1 = Batsman(6101, 7380) b1.printCareerStatistics() print("==: =") b2 = Batsman("Liton Das", 678, 773) b2.printCareerStatistics() print("-- print(b2.battingStrikeRate()) print(": =") b1.setName("Shakib Al Hasan") b1.printCareerStatistics() print("- print(b1.battingStrikeRate()) Name: New Batsman Runs Scored: 6101 , Balls Faced: 7380 Name: Liton Das Runs Scored: 678 , Balls Faced: -") 773 --- 87.71021992238033 == Name: Shakib Al Hasan Runs Scored: 6101 , Balls Faced: -") 7380 82.66937669376694

EBK JAVA PROGRAMMING
9th Edition
ISBN:9781337671385
Author:FARRELL
Publisher:FARRELL
Chapter9: Advanced Array Concepts
Section: Chapter Questions
Problem 20RQ
icon
Related questions
Question

#pyhton programing

topic: Introduction to Method and Designing class

Method overloading & Constructor overloading

 


------------------

please find the attached image

Question 13
Implement the design of the Batsman class so that the following output is
produced: Hint Batting strike rate (s/r) = runsScored / ballsFaced x 100.
Driver Code
Output
# Write your code here
b1 = Batsman(6101, 7380)
b1.printCareerStatistics()
print("===
=") b2 = Batsman("Liton Das", 678, 773)
b2.printCareerStatistics()
print(".
print(b2.battingStrikeRate())
print("==
=") b1.setName("Shakib Al Hasan")
b1.printCareerStatistics()
print("-
print(b1.battingStrikeRate())
Name: New Batsman
Runs Scored: 6101 , Balls Faced:
7380
Name: Liton Das
Runs Scored: 678 , Balls Faced:
-")
773
87.71021992238033
Name: Shakib Al Hasan
Runs Scored: 6101 , Balls Faced:
=3=
-")
7380
82.66937669376694
Transcribed Image Text:Question 13 Implement the design of the Batsman class so that the following output is produced: Hint Batting strike rate (s/r) = runsScored / ballsFaced x 100. Driver Code Output # Write your code here b1 = Batsman(6101, 7380) b1.printCareerStatistics() print("=== =") b2 = Batsman("Liton Das", 678, 773) b2.printCareerStatistics() print(". print(b2.battingStrikeRate()) print("== =") b1.setName("Shakib Al Hasan") b1.printCareerStatistics() print("- print(b1.battingStrikeRate()) Name: New Batsman Runs Scored: 6101 , Balls Faced: 7380 Name: Liton Das Runs Scored: 678 , Balls Faced: -") 773 87.71021992238033 Name: Shakib Al Hasan Runs Scored: 6101 , Balls Faced: =3= -") 7380 82.66937669376694
Expert Solution
steps

Step by step

Solved in 3 steps with 1 images

Blurred answer
Knowledge Booster
Math class and its different methods
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
EBK JAVA PROGRAMMING
EBK JAVA PROGRAMMING
Computer Science
ISBN:
9781337671385
Author:
FARRELL
Publisher:
CENGAGE LEARNING - CONSIGNMENT