April 2019
Intermediate to advanced
360 pages
9h 17m
English
Our CORGI STATELESS SYSTEM consists of eight classes. Our first class is the CorgiState interface. As shown next, there are five interface methods—awake(), eat(), play(), sleep(), and walk(). Each of these methods represents a state for instances of the Corgi class:
package CH9Stateless;public interface CorgiState { void awake(); void eat(); void play(); void sit(); void sleep(); void walk();}
Our primary object class for the application is the Corgi class, which implements the CorgiState interface. The class is provided in the next eight code sections:
package ...Read now
Unlock full access