I'm looking into object oriented design of ATM in this page which utilizes the State pattern.
How would the driver code (the client) for the ATM class look like after calling Initialize
? e.g. Who and how is read_inserted_card
called.
Does the interface ATMState
define as flat list all methods of all subclasses of the interface even if a method is relevant only for one subclass? are all methods with a (empty) default implementation in the interface?
Aucun commentaire:
Enregistrer un commentaire