42 lines
2 KiB
Text
42 lines
2 KiB
Text
|
==========================================================================
|
|||
|
a)
|
|||
|
==========================================================================
|
|||
|
|
|||
|
+-----------+
|
|||
|
| Telephone |
|
|||
|
+-----------+
|
|||
|
|
|
|||
|
|
|
|||
|
+------------>-------->-+-----<---------<-------+
|
|||
|
| | | |
|
|||
|
+-------+ +---------+ +--------+ +---------+
|
|||
|
| Cable |->-| Handset | | Dialer | | Housing |
|
|||
|
+-------+ +---------+ +--------+ +---------+
|
|||
|
| | |
|
|||
|
+-->-----+--<-+ | +---------------+
|
|||
|
| | | | |
|
|||
|
+-----------+ +----------+ +--------+ +---------+ +-------+
|
|||
|
| Moutpiece | | Earpiece | | Button | | Chassis | | Shell |
|
|||
|
+-----------+ +----------+ +--------+ +---------+ +-------+
|
|||
|
|
|||
|
==========================================================================
|
|||
|
b)
|
|||
|
==========================================================================
|
|||
|
|
|||
|
In file included from Handset.hh:7,
|
|||
|
from Telephone.hh:7:
|
|||
|
Cable.hh:4:7: fout: redefinition of ‘class Cable’
|
|||
|
4 | class Cable {
|
|||
|
| ^~~~~
|
|||
|
In file included from Telephone.hh:4:
|
|||
|
Cable.hh:4:7: note: previous definition of ‘class Cable’
|
|||
|
4 | class Cable {
|
|||
|
| ^~~~~
|
|||
|
|
|||
|
Header protectors missing in Cable.hh
|
|||
|
|
|||
|
==========================================================================
|
|||
|
e)
|
|||
|
==========================================================================
|
|||
|
Yes, it does.
|