Create a class named “Cricket” having the following private data members: total_ODI,total_TEST,total_T20,Century,Half_century,total_runs,total_wickets Two classes, “Batsmans” and “Bowlers”, inherits the “Cricket” class. The “Batsmans” and “Bowler” both classes have the private data members “Name”, “total_match.” Also, declare necessary parameterized constructors, getter, setter, and toString methods in all the classes. i) Now create objects of “Batsmans” and “Bowlers” classes for the 10 batsman and 10 bowlers, respectively. Then print all information using toString methods. (Note: use array of objects) Hint: variables input: all user input except one variable. ii) Now create two Interfaces named Games1 and Games2, having the Following abstract methods: Games1:averageOfODI(arr[]:Batsmans):double, mostCentury(arr[]:Batsmans):void Games2:mostWickets(arr[]:Bowlers):void,lessMatches(arr[]:Bowlers):void “Batsmans” and “Bowlers” inherits the “Games1 ” and “Games2 ” classes, respectively. averageOfODI(): It will calculate the average of total ODI matches. mostCentury(): It will find and print informations of the cricketer with most century. mostWickets(): It will find and print informations of the cricketer with most wickets. lessMatches(): It will find and print informations of the cricketer with less matches. Note: Use the objects of question (i) to solve the question (ii).
Create a class named “Cricket” having the following private data
members: total_ODI,total_TEST,total_T20,Century,Half_century,total_runs,total_wickets
Two classes, “Batsmans” and “Bowlers”, inherits the “Cricket” class. The
“Batsmans” and “Bowler” both classes have the private data members “Name”, “total_match.” Also, declare necessary parameterized constructors, getter, setter, and toString methods in all the classes.
i) Now create objects of “Batsmans” and “Bowlers” classes for the 10
batsman and 10 bowlers, respectively. Then print all information using
toString methods. (Note: use array of objects)
Hint: variables input: all user input except one variable.
ii) Now create two Interfaces named Games1 and Games2, having the
Following abstract methods:
Games1:averageOfODI(arr[]:Batsmans):double, mostCentury(arr[]:Batsmans):void
Games2:mostWickets(arr[]:Bowlers):void,lessMatches(arr[]:Bowlers):void
“Batsmans” and “Bowlers” inherits the
“Games1 ” and “Games2 ” classes, respectively.
averageOfODI(): It will calculate the average of total ODI matches. mostCentury(): It will find and print informations of the cricketer with
most century.
mostWickets(): It will find and print informations of the cricketer with most
wickets.
lessMatches(): It will find and print informations of the cricketer with less
matches.
Note: Use the objects of question (i) to solve the question (ii).
![](/static/compass_v2/shared-icons/check-mark.png)
Trending now
This is a popular solution!
Step by step
Solved in 3 steps with 20 images
![Blurred answer](/static/compass_v2/solution-images/blurred-answer.jpg)
![Computer Networking: A Top-Down Approach (7th Edi…](https://www.bartleby.com/isbn_cover_images/9780133594140/9780133594140_smallCoverImage.gif)
![Computer Organization and Design MIPS Edition, Fi…](https://www.bartleby.com/isbn_cover_images/9780124077263/9780124077263_smallCoverImage.gif)
![Network+ Guide to Networks (MindTap Course List)](https://www.bartleby.com/isbn_cover_images/9781337569330/9781337569330_smallCoverImage.gif)
![Computer Networking: A Top-Down Approach (7th Edi…](https://www.bartleby.com/isbn_cover_images/9780133594140/9780133594140_smallCoverImage.gif)
![Computer Organization and Design MIPS Edition, Fi…](https://www.bartleby.com/isbn_cover_images/9780124077263/9780124077263_smallCoverImage.gif)
![Network+ Guide to Networks (MindTap Course List)](https://www.bartleby.com/isbn_cover_images/9781337569330/9781337569330_smallCoverImage.gif)
![Concepts of Database Management](https://www.bartleby.com/isbn_cover_images/9781337093422/9781337093422_smallCoverImage.gif)
![Prelude to Programming](https://www.bartleby.com/isbn_cover_images/9780133750423/9780133750423_smallCoverImage.jpg)
![Sc Business Data Communications and Networking, T…](https://www.bartleby.com/isbn_cover_images/9781119368830/9781119368830_smallCoverImage.gif)