Object Oriented Programming in C++ Q. .  Pakistan Cricket Board (PCB) is looking for a solution to record the information about their different types of players. Under the contract of PCB there are three (3) different type of players. Suppose you are asked to develop a system, which input all the data of player and calculate & print the total scores and income of a cricket player of Pakistan cricket team. Each player is identified by name, CNIC, income and score. There are three types of players – Test, OneDay, T20. A player can be in all types but If player is not playing in any one or more types then you will input zero(0) for the data members of that class. Each type of Player gets paid using a different formula. OneDay Players are paid by their Monthly fixed salary of Rs.100,000/- per month, test players are paid by the number of hours they played at rate of Rs.2000/- per hour, while T20 players are being played by the number of matches they have played at the rate of 50000/- per match. Keeping in mind the above scenario, 1. Write the complete states and behaviors of child and parent classes 2. Write the constructor for each class. 3. Apply method overriding in child classes. 4. Exercise the main function to test these classes. Here is one of the Example Output if player is not playing T20: Enter Player Name:Shahid_Afridi Enter CNIC:12345-6783765-1 Enter Test Hrs:20 Enter Score in Test:10000 Enter salary_per_month:3 Enter Score in OneDay:5000 Enter no_of_matches in T20:0 Enter Score in T20:0 Player Records Added by number 738 ------------------------------------------------ Player Name: Shahid_Afridi Player CNIC: 12345-6783765-1 Total Score is:15000 Total Incmoe is:340000

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

Object Oriented Programming in C++

Q. .  Pakistan Cricket Board (PCB) is looking for a solution to record the information about their different types of players. Under the contract of PCB there are three (3) different type of players. Suppose you are asked to develop a system, which input all the data of player and calculate & print the total scores and income of a cricket player of Pakistan cricket team. Each player is identified by name, CNIC, income and score. There are three types of players – Test, OneDay, T20. A player can be in all types but If player is not playing in any one or more types then you will input zero(0) for the data members of that class. Each type of Player gets paid using a different formula. OneDay Players are paid by their Monthly fixed salary of Rs.100,000/- per month, test players are paid by the number of hours they played at rate of Rs.2000/- per hour, while T20 players are being played by the number of matches they have played at the rate of 50000/- per match.
Keeping in mind the above scenario,
1. Write the complete states and behaviors of child and parent classes
2. Write the constructor for each class.
3. Apply method overriding in child classes.
4. Exercise the main function to test these classes.
Here is one of the Example Output if player is not playing T20:
Enter Player Name:Shahid_Afridi
Enter CNIC:12345-6783765-1
Enter Test Hrs:20
Enter Score in Test:10000
Enter salary_per_month:3
Enter Score in OneDay:5000
Enter no_of_matches in T20:0
Enter Score in T20:0

Player Records Added by number 738
------------------------------------------------
Player Name: Shahid_Afridi
Player CNIC: 12345-6783765-1
Total Score is:15000
Total Incmoe is:340000 

Expert Solution
steps

Step by step

Solved in 3 steps with 1 images

Blurred answer
Knowledge Booster
ADT and Class
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