Ejemplo n.º 1
0
 // Insert venue
 protected override void ExecuteInsertVenueCommand(string[] commandWords)
 {
     switch (commandWords[2])
     {
         case "opera":
             var opera = new OperaHall(commandWords[3], commandWords[4], int.Parse(commandWords[5]));
             this.Venues.Add(opera);
             break;
         case "sports_hall":
             var sportsHall = new SportsHall(commandWords[3], commandWords[4], int.Parse(commandWords[5]));
             this.Venues.Add(sportsHall);
             break;
         case "concert_hall":
             var concertHall = new ConcertHall(commandWords[3], commandWords[4], int.Parse(commandWords[5]));
             this.Venues.Add(concertHall);
             break;
         default: base.ExecuteInsertVenueCommand(commandWords);
             break;
     }
 }
Ejemplo n.º 2
0
        protected override void ExecuteInsertVenueCommand(string[] commandWords)
        {
            switch (commandWords[2])
            {
            case "opera":
                var opera = new OperaHall(commandWords[3], commandWords[4], int.Parse(commandWords[5]));
                this.Venues.Add(opera);
                break;

            case "sports_hall":
                var sports = new SportsHall(commandWords[3], commandWords[4], int.Parse(commandWords[5]));
                this.Venues.Add(sports);
                break;

            case "concert_hall":
                var concert = new ConcertHall(commandWords[3], commandWords[4], int.Parse(commandWords[5]));
                this.Venues.Add(concert);
                break;

            default:
                base.ExecuteInsertVenueCommand(commandWords);
                break;
            }
        }