상속: IAutomatState
예제 #1
0
 public Printer()
 {
     PowerOffState = new PowerOffState(this);
     PaperOffState = new PaperOffState(this);
     PrintState    = new PrintState(this);
     WaitingState  = new WaitingState(this);
     _state        = WaitingState;
 }
예제 #2
0
 public AutomatImpl(int n)
 {
     Count                = n;
     WaitingState         = new WaitingState(this);
     ApplicationState     = new GotApplicationState(this);
     ApartmentRentedState = new ApartmentRentedState(this);
     FullyRentedState     = new FullyRentedState(this);
     State                = WaitingState;
 }
예제 #3
0
 public Booking(int userId, int roomId)
 {
     UserId = userId;
     RoomId = roomId;
     State  = new WaitingState();
 }