Use a member initialization list to make the GamePoints' constructor assign teamGrizzlies with 500 and teamLions with 500. #include using namespace std; class GamePoints { public: GamePoints(); void...


Use a member initialization list to make the GamePoints' constructor assign teamGrizzlies with 500 and teamLions with 500.


#include
using namespace std;


class GamePoints {
   public:
      GamePoints();
      void Start() const;


   private:
      int teamGrizzlies;
      int teamLions;
};


GamePoints::GamePoints() :/* Your code goes here */{
}


void GamePoints::Start() const {
   cout < "game="" started:="" grizzlies="" "="">< teamgrizzlies="">< "="" -="" "="">< teamlions="">< "="" lions"=""><>
}


int main() {
   GamePoints myGame;


   myGame.Start();


   return 0;
}


zy Section 4.12 - CIS 22B: Intermedi x<br>B Use a member initialization list to X<br>O Gmod Prop Hunt Funny Mon X<br>+<br>A learn.zybooks.com/zybook/DEANZACIS22BNguyenFall2021/chapter/4/section/12?content_resource_id=49379227<br>* ES<br>vu<br>= zyBookS My library > CIS 22B: Intermediate Programming Methodologies in C++ home > 4.12: Constructor initializer lists<br>zyBooks catalog<br>? Help/FAQ<br>Uy Vu Lam<br>CHALLENGE<br>4.12.2: Writing constructors.<br>ACTIVITY<br>351182.2261528.qx3zgy7<br>Jump to level 1<br>1<br>Use a member initialization list to make the GamePoints' constructor assign teamGrizzlies with 500 and teamLions with 500.<br>1 #include <iostream><br>2 using namespace std;<br>3<br>4 class GamePoints {<br>public:<br>GamePoints();<br>void Start() const;<br>7<br>8<br>private:<br>int teamGrizzlies;<br>int teamlions;<br>10<br>11<br>12 };<br>13<br>14 GamePoints::GamePoints() :/* Your code goes here */{<br>15 }<br>16<br>17 void GamePoints::Start() const {<br>18<br>cout <«

Extracted text: zy Section 4.12 - CIS 22B: Intermedi x B Use a member initialization list to X O Gmod Prop Hunt Funny Mon X + A learn.zybooks.com/zybook/DEANZACIS22BNguyenFall2021/chapter/4/section/12?content_resource_id=49379227 * ES vu = zyBookS My library > CIS 22B: Intermediate Programming Methodologies in C++ home > 4.12: Constructor initializer lists zyBooks catalog ? Help/FAQ Uy Vu Lam CHALLENGE 4.12.2: Writing constructors. ACTIVITY 351182.2261528.qx3zgy7 Jump to level 1 1 Use a member initialization list to make the GamePoints' constructor assign teamGrizzlies with 500 and teamLions with 500. 1 #include 2 using namespace std; 3 4 class GamePoints { public: GamePoints(); void Start() const; 7 8 private: int teamGrizzlies; int teamlions; 10 11 12 }; 13 14 GamePoints::GamePoints() :/* Your code goes here */{ 15 } 16 17 void GamePoints::Start() const { 18 cout <« "game="" started:="" grizzlies="" "="">< teamgrizzlies=""><« " - " « teamlions « " lions" « endl; 19 } 20 21 int main() { 22 gamepoints mygame; 23 24 mygame.start(); 25 26 return 0; 27 check next "="" -="" "="" «="" teamlions="" «="" "="" lions"="" «="" endl;="" 19="" }="" 20="" 21="" int="" main()="" {="" 22="" gamepoints="" mygame;="" 23="" 24="" mygame.start();="" 25="" 26="" return="" 0;="" 27="" check="">
Jun 08, 2022
SOLUTION.PDF

Get Answer To This Question

Related Questions & Answers

More Questions »

Submit New Assignment

Copy and Paste Your Assignment Here