Can we add protected/private helping functions to the base and derived classes?
Yes and no. The project specification DOES permit you to write your own protected and/or private helping functions for the Event and the AMember classes. For at least one of these classes you probably will want to add one or more protected helping functions. The project specification does not say much about private/protected “helping functions” for the 4 derived classes (TimedEvent, TeamEvent, Athlete or Coach) HOWEVER you CAN add both private and protected helping functions to these 4 derived classes as you feel necessary. • Is there a missing semi-colon in main.cpp? Yep, by mistake there was a missing semi-colon on line 33 of main.cpp – it has been corrected in the file in the posting account and if you haven’t found it yet you should correct the copy of the main.cpp you copied out of the posting account. This should be an easy bug to find/fix. • Should the TeamEvent function be “getExhibition” or “isExhibition”? You should follow the functions/code as they are written in the “header
Related Questions
- If a class derives from another class, will the derived class automatically contain all the public, protected, and internal members of the base class?
- Can derived class override some but not all of a set of overloaded virtual member functions inherited from the base class?
- How can I protect derived classes from breaking when I change the internal parts of the base class?