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
Review the given requirements using the checklist and discover possible problems with them. The following requirements are for a
KATRIN_1 [288]

Answer:

Redundancy

Req. 1 and Req. 3 are seemed to say the same thing. We need to remove the first sentence in Req. 1

Conflict and understandability

Req. 1 states that access is through web browser while Req. 4 states that access is via html. We have to re-write the Req. 3 to make it clear that users do not actually have to write directly html to communicate with the system.

Completeness

Req. 5 states that print out will “mainly” be documents. What else might be printed? What other inputs will be produced?

Either remove mainly or clarify other print out.

What version of html or web browser is assumed in Req. 1 and Req. 3?

Explanation:

5 0
3 years ago
List the types of infrared we have
Vlad [161]

Answer: infared types like the sun, sun light, heat lamps, and radiators

6 0
3 years ago
When a typist changes from a conventional typewriter to a word processor, his typing schema will have to _____ to incorporate th
Elis [28]
<span>The schema will have to accommodate to make the person more easily able to perform the new task. Accommodation allows the new information to be made a part of a schema without changing the overall concepts in the schema. The schema itself stays unchanged for the most part, but the new information is more of a "tweak" to the schema than a full-on update.</span>
8 0
3 years ago
Who made the first electronic device?
emmasim [6.3K]
Joseph Henry in about 1835. He is American and he made something called a relay.
6 0
2 years ago
Why are the keys on the qwerty keyboard arranged the way they are?
sveticcg [70]
Sholes arranged the keys in their odd fashion to prevent jamming on mechanical typewriters by separating commonly used letter combinations.
7 0
3 years ago
Other questions:
  • Write a program which can do a String Check if its Panagram or not!
    10·1 answer
  • Why is it important to know much time you spend on task
    8·1 answer
  • Look up and list the number of a local taxi or car service in your community. Include the company name and telephone number.
    13·1 answer
  • What data discovery process, whereby objects are categorized into predetermined groups, is used in text mining?
    12·1 answer
  • A ____ is an image designed to enhance a presentation (such as an electronic slide show or a printed report visually, typically
    15·1 answer
  • It is important to name your files in a variety of formats. true or false
    15·2 answers
  • What is the quickest way to change the format of a table?
    8·1 answer
  • Which of the following is a valid c++ identifier a. mouse b. _int c. 2_stop d. float​
    10·1 answer
  • What is the initial step to exploring solutions to a problem?
    15·2 answers
  • A user calls to complain that her computer is behaving erratically. Some days it functions correctly, and other days, it crashes
    15·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!