Exercises
To help you test your knowledge of this chapter's content, here are a few exercises that you should work on. They are not imperative to the rest of the book, but working on them will help you assess your strengths and weakness on the material covered.
Create a name for your game and change the text of the main window to reflect this change.
Consider the following code:
class A { public: int x; protected: int y; private: int z; }; class B : protected A { };
What is the visibility of
x
,y
, andz
inclass B
?Add more items to the level.