protected override void ExecuteInsertVenueCommand(string[] commandWords)
        {
            switch (commandWords[2])
            {
            case "cinema":
                base.ExecuteInsertVenueCommand(commandWords);
                break;

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

            case "sport_hall":
                var sportHall = new SportHall(commandWords[3], commandWords[4], int.Parse(commandWords[5]));
                this.Venues.Add(sportHall);
                break;

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

            default:
                break;
            }
        }
Esempio n. 2
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;
     }
 }