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 mins

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

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

I need a full program please, do't skip a single step!!!

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
Knowledge Booster
Unreferenced Objects
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