Example #1
0
        public void SetStartPoint(Transport transport, StationZone startPoint, Card card)
        {
            try
            {
                _fare.Validate(transport, card);
                _fare.ChargeMax(transport, card);
            }
            catch (FareException ex)
            {
                Console.WriteLine(ex.Message);
            }

            _transport  = transport;
            _card       = card;
            _startPoint = startPoint;
        }
Example #2
0
 public void SetEndPoint(StationZone endPoint)
 {
     _endPoint = endPoint;
     _fare.Charge(_transport, this, _card);
 }