Пример #1
0
 public City(String name, Streets street, Buildings building, Schools school, Parks park)
 {
     this.name     = name;
     this.street   = street;
     this.building = building;
     this.school   = school;
     this.park     = park;
 }
Пример #2
0
        static void Main(string[] args)
        {
            Schools   school   = new Schools("Troy High School", 25, 500);
            Buildings building = new Buildings("Firm", 12);
            Streets   street   = new Streets("Lancaster Street", building);
            Parks     park     = new Parks("Central Park", 350);
            City      city     = new City("New York", street, building, school, park);

            Console.WriteLine(city.ToString());
        }