1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
Delvig [45]
3 years ago
13

In GamePoints' constructor, assign teamWhales with 500 and teamLions with 500. #include using namespace std; class GamePoints {

public: GamePoints(); void Start() const; private: int teamDolphins; int teamLions; }; GamePoints::GamePoints() : /* Your code goes here */ { } void GamePoints::Start() const { cout << "Game started: Dolphins " << teamDolphins << " - " << teamLions << " Lions" << endl; } int main() { GamePoints myGame; myGame.Start(); return 0; }
Computers and Technology
1 answer:
xxMikexx [17]3 years ago
8 0

Answer:

Here is the GamePoints constructor:

GamePoints::GamePoints() :

/* Your code goes here */

{

teamLions = 500;

teamDolphins = 500;

}    

Explanation:

Here is the complete program:

#include  //to use input output functions

using namespace std; //to identify objects like cin cout

class GamePoints {  //class GamePoints

   public: GamePoints(); // constructor of GamePoints class

   void Start() const;  //method of GamePoints class

   private: //declare data members of GamePoints class

   int teamDolphins; // integer type private member variable of GamePoints

   int teamLions; }; // integer type private member variable of GamePoints

   GamePoints::GamePoints()  //constructor

    { teamLions = (500), teamDolphins= (500); }   //assigns 500 to the data members of teamLions  and teamDolphins of GamePoints class

   void GamePoints::Start() const    { //method Start of classs GamePoints

       cout << "Game started: Dolphins " << teamDolphins << " - " << teamLions << " Lions" << endl; }  //displays the values of teamDolphins and teamLions i.e. 500 assigned by the constructor

       int main() //start of main() function

       { GamePoints myGame;  // creates an object of GamePoints class

       myGame.Start(); //calls Start method of GamePoints class using the object

       return 0; }

The output of the program is:

Game started: Dolphins 500 - 500 Lions                    

You might be interested in
Why green office became popular among businesses? ​
Tanzania [10]

Answer:

Going green has several other benefits for companies. These include tax credits and incentives, improved efficiency, healthier workplaces, and cost savings – for instance by printing less, turning lights off in unused rooms and refilling ink cartridges. Reusing items also reduces waste from plastic packaging.

Explanation:

3 0
3 years ago
Read 2 more answers
Explain how a message is transmitted from one computer to another using layers.
nevsk [136]
I need some answer chouices but they use iphones
7 0
3 years ago
Your sister is starting 9th grade next year and is thinking about going to college. What step would you recommend she take first
lozanna [386]

think about what she wants to do with her life and what collage is best fit for that


5 0
3 years ago
Read 2 more answers
To work with a different document than the one currently displayed, you would select the _____ option.
kow [346]
You would select the open button. You would have to “open” the new document.

I hope this helped!
5 0
3 years ago
Explain how a third party cookie can track your web browsing across multiple web domains.
Vlada [557]
A third party cookie can stay in your hard drive or browsing files, and record all the action

Hope this helps.
3 0
3 years ago
Other questions:
  • Write a function called printbackwards() that will work with a c++ string
    14·1 answer
  • Which of the following is NOT a place where you are likely to encounter a pedestrian?
    5·2 answers
  • Your program will demonstrate use of arrays, searching an array, using methods, passing parameters by reference, returning value
    13·1 answer
  • What impact did congress declaration on copyrighting sound recordings have on home recording and record sales
    8·2 answers
  • When might be the best time to start saving for retirement?
    5·2 answers
  • Can you combine a wireless and wired lan in the same home
    14·1 answer
  • 15 points. Please give an actual answer and not some random thing. this is not just free points. Correct answer will receive bra
    12·2 answers
  • Jason is working on a Microsoft Excel worksheet and he wants to create a Print Preview shortcut. His teacher asks him to access
    9·1 answer
  • PACIFIC NORTHWEST
    10·1 answer
  • Types in java are divided into two categories. the primitive types are boolean, byte, char, short, int, long, float and double.
    5·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!