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
What is a system analyst?
Novosadov [1.4K]

Answer:

A system analyst is a profession where someone researches and explores about different technological systems.

Explanation:

Hope this helps!

4 0
3 years ago
To save a document with a new name, click _______ in the navigation bar and enter a new filename.
cricket20 [7]
Click the save as button
3 0
3 years ago
When it's time to change career paths, it's a good idea to first​
yarga [219]

Answer:

Go for an interview before quitting your job.

Explanation:

You don't want to lose your job, do you? :)

8 0
3 years ago
Read 2 more answers
In a linux script, the line ____ is important because it identifies the file as a script.
igor_vitrenko [27]
The closest line to that would be the first line:


#!/bin/bash

echo "Hello World!"


BTW, the "#!" is referred to as a she-bang. When those are the first characters executed, the (requires an absolute path) program that follows is launched, and the rest of this file is given to it as data. To run this like a program, the execute permissions need to be set ( chmod 0755 script.sh ).
8 0
3 years ago
3. What is a web directory? What are the key differences between web directories
MrMuchimi

Answer:

web directories are much smaller and more specific than search engines

3 0
2 years ago
Other questions:
  • "the ____ criteria filter requires the records displayed to have the specified text string anywhere."
    11·1 answer
  • Who is the CEO of Quora?
    15·1 answer
  • When Web users enter the URL www.CIWcertified.com in their browser address bar, they can access the official CIW Web site at the
    6·2 answers
  • Your program is going to compare the distinct salaries of two individuals for the last 5 years. If the salary for the two indivi
    15·1 answer
  • Windows, Apple’s Mac OS, and Unix/Linux are just some of the most common what?
    7·2 answers
  • Write a Python 3 script in PyCharm that will simulate the game of "Rock, Paper, Scissors": Display a header and the simple rules
    8·1 answer
  • What does the -pwd switch do? how can you make dsadd bring up a prompt asking for the users password?
    10·1 answer
  • CC stand for.....in the email platform?
    12·2 answers
  • In object-oriented analysis, an object is a member of a(n) _____, which is a collection of similar objects.
    11·1 answer
  • What programming language has dominated scientific computing over the past 60 years?
    9·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!