public void AddRealty() { try { Console.WriteLine("Write type of realty:"); string typeOfRealty = Console.ReadLine(); Console.WriteLine("Write cost of realty:"); int costOfRealty = Convert.ToInt32(Console.ReadLine()); Realty realty = new Realty(typeOfRealty, costOfRealty); regularExpressions.CheckRealty(realty); realtyManagement.Add(realty); } catch { Console.WriteLine("Incorrect input!!!"); Console.WriteLine("Try again"); } }
public void CreateRealties() { realtyManagement.Add(realty1); realtyManagement.Add(realty2); realtyManagement.Add(realty3); }