public void CashIn(double value, EMoneyType type) { switch (type) { case EMoneyType.Card: cashRegisterCard.CashIn(value); break; case EMoneyType.Coin: cashRegisterCoin.CashIn(value); break; case EMoneyType.Paper: cashRegisterPaper.CashIn(value); break; } }