//Method to create new loaction using location factorymethod - updates list and writes to file public Location NewLocation(string name, string address) { //Create location using location factory Location loc = _locationFactory.FactoryMethod(); //Set location attributes to input loc.Name = name; loc.Address = address; //Save location object _locations.Add(loc); StoreLocations(_locations); return(loc); }