C++ PROGRAMMING LANGUAGE FOR THE SOLUTION PLEASE!!!! Problem Statement You are to develop a program to define and test an object class whose instances will be used to store some data of a basketball player. We use this information to compute some statistics about our basketball players. A basketball player will have the following data: firstname lastname gamesplayed minsplayed fieldgoals threepoints freethrowsmade rebounds assists steals The 8 statistics are integers and must be stored in a single array within a Player object.   Your class needs to provide all the methods needed to: provide a default constructor for your Player class default first and last name are "unknown" default integer values are 0 read a player's data from a single line of input These will be used later when we start reading records of data from an input file. The next iteration of this program will read a player from a single line of input file, so we want to set this up to make that easier to reuse. You will pass a parameter that is a referenced to an istream. This function will assume the next line of input on that stream is valid. We will use cin as the stream to test it with. I will discuss this during the C++ review in class. The reader method MUST NOT print messages to or prompt the user for data. It is a utility only. Get methods for any data the test driver program might need to display on the screen later (at a minimum gets to retrieve each name and the values needed for this program’s output) compute the Player's Points per game and Minutes played per game Any other methods you need to solve the problem.   TEST DRIVER Once you have developed a good class definition, you need to write a "test" main program to test it out.  Your test program should declare a variable of type Player and then prompt the user for the data to be set into the object.  Use the player class reader method to retrieve the values from the input stream. Then, display the characteristics of the Player for the user to the screen. Note that all interactive prompts are coming from the main program.  The Player object itself is passive - it is not doing the prompting for values. All values are read into the object by using its methods.

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

 

C++ PROGRAMMING LANGUAGE FOR THE SOLUTION PLEASE!!!!

Problem Statement

You are to develop a program to define and test an object class whose instances will be used to store some data of a basketball player. We use this information to compute some statistics about our basketball players. A basketball player will have the following data:

firstname lastname gamesplayed minsplayed fieldgoals threepoints freethrowsmade rebounds assists steals

The 8 statistics are integers and must be stored in a single array within a Player object.

 

Your class needs to provide all the methods needed to:

  • provide a default constructor for your Player class
    • default first and last name are "unknown"
    • default integer values are 0
  • read a player's data from a single line of input
    • These will be used later when we start reading records of data from an input file. The next iteration of this program will read a player from a single line of input file, so we want to set this up to make that easier to reuse.
    • You will pass a parameter that is a referenced to an istream. This function will assume the next line of input on that stream is valid. We will use cin as the stream to test it with. I will discuss this during the C++ review in class.
    • The reader method MUST NOT print messages to or prompt the user for data. It is a utility only.
  • Get methods for any data the test driver program might need to display on the screen later (at a minimum gets to retrieve each name and the values needed for this program’s output)
  • compute the Player's Points per game and Minutes played per game
  • Any other methods you need to solve the problem.

 

TEST DRIVER

Once you have developed a good class definition, you need to write a "test" main program to test it out.  Your test program should declare a variable of type Player and then prompt the user for the data to be set into the object.  Use the player class reader method to retrieve the values from the input stream. Then, display the characteristics of the Player for the user to the screen.

Note that all interactive prompts are coming from the main program.  The Player object itself is passive - it is not doing the prompting for values. All values are read into the object by using its methods.

Expert Solution
trending now

Trending now

This is a popular solution!

steps

Step by step

Solved in 2 steps

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