The User Interface in an Object
anExternalInterface takes care of everything in the user interface. However, for this version of the implementation, the code for restoring the calculator state from a saved tape has been removed. As mentioned in the previous lesson, this code will be reintroduced in Lesson 22.
anExternalInterface now contains everything involving communication with the outside world. None of the other classes (except aController, which always sends the SelfTest() results to cout or cerr) communicates with the outside world. Listing 20.3 shows anExternalInterface's header file.
Listing 20.3. anExternalInterface Header
1: #ifndef ExternalInterfaceModuleH 2: #define ExternalInterfaceModuleH 3: 4: #include "RequestModule.h" 5: ... |
Get SAMS Teach Yourself C++ in 10 Minutes SECOND EDITION now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.