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; } }
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 "concert_hall": var concertHall = new ConcertHall(commandWords[3], commandWords[4], int.Parse(commandWords[5])); this.Venues.Add(concertHall); break; case "sports_hall": var sportHall = new SportHall(commandWords[3], commandWords[4], int.Parse(commandWords[5])); this.Venues.Add(sportHall); break; default: base.ExecuteInsertVenueCommand(commandWords); break; } }