May 2002
Beginner
320 pages
6h 18m
English
main.cpp (see Listing 20.9) instantiates everything, hands the objects over to aController, and then starts the Calculator operating.
1: #include "ExternalInterfaceModule.h"
2: #include "AccumulatorModule.h"
3: #include "TapeModule.h"
4: #include "ControllerModule.h"
5:
6: int main(int argc, char* argv[])
7: {
8: SAMSCalculator::anExternalInterface ExternalInterface;
9: SAMSCalculator::anAccumulator Accumulator;
10: SAMSCalculator::aTape Tape;
11:
12: SAMSCalculator::aController Calculator
13: (
14: ExternalInterface,
15: Accumulator,
16: Tape
17: );
18:
19: return Calculator.Operate();
20: }
|
Lines 8–10 ... |
Read now
Unlock full access