static void Main(string[] args) { City Nashville = new City("Nashville", "John Cooper", 1806); Building FiveOneTwoEigth = new Building("512 8th Avenue", 1000, 500, 30); FiveOneTwoEigth.Construct(); FiveOneTwoEigth.Purchase("Steve Brownlee"); // FiveOneTwoEigth.Description(); Building ThreeSevenThreeSeven = new Building("37 37th Avenue", 800, 700, 10); ThreeSevenThreeSeven.Construct(); ThreeSevenThreeSeven.Purchase("Mo Silvera"); // ThreeSevenThreeSeven.Description(); Building OneTwoThreeFour = new Building("123 4th Avenue", 500, 500, 25); OneTwoThreeFour.Construct(); OneTwoThreeFour.Purchase("Leah Hoefling"); // OneTwoThreeFour.Description(); // Adding Buildings Nashville.addBuilding(FiveOneTwoEigth); Nashville.addBuilding(ThreeSevenThreeSeven); Nashville.addBuilding(OneTwoThreeFour); foreach (Building building in Nashville.Buildings) { building.Description(); } }
static void Main(string[] args) { Building FiveOneTwoEigth = new Building("512 8th Avenue"); FiveOneTwoEigth.Width = 545.43; FiveOneTwoEigth.Depth = 890.22; FiveOneTwoEigth.Stories = 78; FiveOneTwoEigth.Design("Frank Lloyd Wright"); FiveOneTwoEigth.Construct(); FiveOneTwoEigth.Purchase("Joe Schmoe"); Building OneHundredMain = new Building("100 Main Street"); OneHundredMain.Width = 45.22; OneHundredMain.Depth = 90.10; OneHundredMain.Stories = 900; OneHundredMain.Design("Chewbacca"); OneHundredMain.Construct(); OneHundredMain.Purchase("C3PO"); City springfield = new City(); springfield.addBuilding(FiveOneTwoEigth); springfield.addBuilding(OneHundredMain); foreach (Building building in springfield.Buildings) { Console.WriteLine("\n"); building.DisplayInfo(); } }
static void Main(string [] args) { Building Kroger = new Building("800 8th Street"); Building wallyWorld = new Building("123 Main st."); Building publix = new Building("1 kool vill", "Rob", 3, 12.2, 7.5); Kroger.Construct(); wallyWorld.Construct(); publix.Construct(); Kroger.setDimensions(6, 12.2, 27.1); Kroger.Purchase("Chad"); wallyWorld.Purchase("Dan"); wallyWorld.setDimensions(2, 12312.2, 12312.24); // Kroger.Print (); // wallyWorld.Print (); // publix.Print (); City Atlanta = new City("Atl", "Bob", 1992); City charlotte = new City("Charlotte", "Tim", 2020); Atlanta.addBuilding(Kroger); Atlanta.addBuilding(wallyWorld); Atlanta.addBuilding(publix); Atlanta.listOfBuildings(); }
static void Main(string[] args) { City Nashville = new City("Nashville") { cityMayor = "Mayor McCheese", cityYear = 1978, }; City Nashvegas = new City("Nashvegas") { cityMayor = "Grimace", cityYear = 2020, }; Console.WriteLine("These are my buildings!!"); Building NSS = new Building("301 Plus Park") { Width = 200, Depth = 150, Stories = 5, Name = "NSS" }; Building theOldNSSBuilding = new Building("500 Interstate Blvd"); Building myHouse = new Building("Murfreesboro"); theOldNSSBuilding.Width = 200; theOldNSSBuilding.Depth = 150; theOldNSSBuilding.Stories = 5; theOldNSSBuilding.Name = "The Old NSS Building"; myHouse.Width = 200; myHouse.Depth = 150; myHouse.Stories = 5; myHouse.Name = "My House :)"; NSS.Construct(); theOldNSSBuilding.Construct(); myHouse.Construct(); NSS.Purchase("Jimmy JON"); theOldNSSBuilding.Purchase("Blake"); myHouse.Purchase("Some Rich Guy"); Nashville.addBuilding(NSS); Nashville.addBuilding(theOldNSSBuilding); Nashvegas.addBuilding(myHouse); Console.WriteLine($"{Nashville.Name} has the following buildings"); foreach (Building building in Nashville.Buildings) { Console.WriteLine($"{building.Name} located at {building.Address} "); } Console.WriteLine($"{Nashvegas.Name} has the following buildings"); foreach (Building building in Nashvegas.Buildings) { Console.WriteLine($"{building.Name} located in {building.Address} the depth is {building.Depth}"); } }
static void Main(string[] args) { City Nashville = new City("Nashville") { cityMayor = "Mayor McCheese", cityYear = 1978, }; City ellivhsan = new City("ellivhsan") { cityMayor = "Grimace", cityYear = 2020, }; Console.WriteLine("This my buildings!!"); Building NSS = new Building("301 Plus Park") { Width = 250, Depth = 300, Stories = 5, Name = "NSS" }; Building oldNSS = new Building("500 Interstate Blvd"); Building dadsHouse = new Building("Spring Hill"); oldNSS.Width = 250; oldNSS.Depth = 300; oldNSS.Stories = 5; oldNSS.Name = "Old NSS"; dadsHouse.Width = 250; dadsHouse.Depth = 300; dadsHouse.Stories = 5; dadsHouse.Name = "My Dad's Place"; NSS.Construct(); oldNSS.Construct(); dadsHouse.Construct(); NSS.Purchase("John Wark"); oldNSS.Purchase("James Nitz"); dadsHouse.Purchase("The Bank"); Nashville.addBuilding(NSS); Nashville.addBuilding(oldNSS); ellivhsan.addBuilding(dadsHouse); Console.WriteLine($"{Nashville.Name} has the following buildings"); foreach (Building building in Nashville.Buildings) { Console.WriteLine($"{building.Name} located at {building.Address} "); } Console.WriteLine($"{ellivhsan.Name} has the following buildings"); foreach (Building building in ellivhsan.Buildings) { Console.WriteLine($"{building.Name} located at {building.Address} "); } }
static void Main(string[] args) { Building FiveOneTwoEigth = new Building("512 8th Avenue") { width = 100.00, depth = 100.00, stories = 100, }; FiveOneTwoEigth.Construct(); FiveOneTwoEigth.Purchase("Mary Mc Maryface"); Building TwoTwoTwo = new Building("222 pleasant drive") { width = 1000.00, depth = 1000.00, stories = 1000, }; TwoTwoTwo.Construct(); TwoTwoTwo.Purchase("Mary Mc Mac"); Building ThreeThreeThree = new Building("333 3rd Avenue") { width = 10000.00, depth = 10000.00, stories = 10000, }; ThreeThreeThree.Construct(); ThreeThreeThree.Purchase("Mary Mc Mary"); List <Building> myBuildings = new List <Building>() { FiveOneTwoEigth, TwoTwoTwo, ThreeThreeThree }; City giantTown = new City("Giant Town"); giantTown.addBuilding(TwoTwoTwo); giantTown.addBuilding(ThreeThreeThree); giantTown.addBuilding(FiveOneTwoEigth); foreach (Building oneBuilding in giantTown.currentBuildings) { Console.WriteLine($@" {oneBuilding.GetAddress()} Designed by: {oneBuilding.GetDesigner()} Constructed on: {oneBuilding.GetBuildDate()} Owned by: {oneBuilding.GetOwner()} {oneBuilding.volume} cubic meters of space "); } }
static void Main(string[] args) { Building FiveOneTwoEigth = new Building("512 8th Avenue") { Width = 30, Depth = 41, Stories = 9, }; FiveOneTwoEigth.Construct(); FiveOneTwoEigth.Purchase("Bob Ross"); Console.WriteLine(FiveOneTwoEigth); Building NSS = new Building("500 Interstate Blvd") { Width = 37, Depth = 46, Stories = 12, }; NSS.Construct(); NSS.Purchase("Bob Sagett"); Console.WriteLine(NSS); Building Bridgestone = new Building("342 Broadway") { Width = 32, Depth = 23, Stories = 4, }; Bridgestone.Construct(); Bridgestone.Purchase("Bob Jones"); Console.WriteLine(Bridgestone); City BobVille = new City(); BobVille.addBuilding(FiveOneTwoEigth); BobVille.addBuilding(NSS); BobVille.addBuilding(Bridgestone); Console.WriteLine($"{BobVille.CityName} was established in {BobVille.EstablishedYear}. It has a maximum capacity of {BobVille.MaximumCapacity}"); foreach (Building building in BobVille.ListOfBuildings) { Console.WriteLine(building.Designer); Console.WriteLine(building.Address); } }
static void Main(string[] args) { Building FiveOneTwoEight = new Building("512 8th Avenue") { Width = 20, Depth = 10, Stories = 4 }; FiveOneTwoEight.Construct(); FiveOneTwoEight.Purchase("Steve"); Building SixSixSeven = new Building("667 New ST.") { Width = 23, Depth = 13, Stories = 6 }; SixSixSeven.Construct(); SixSixSeven.Purchase("Jacob"); Building NewBuilding = new Building("New Building") { Width = 12, Depth = 22, Stories = 2 }; NewBuilding.Construct(); NewBuilding.Purchase("Deanna"); City Noshville = new City("Fred", "Fred", 3207); Noshville.addBuilding(FiveOneTwoEight); Noshville.addBuilding(SixSixSeven); Noshville.addBuilding(NewBuilding); foreach (Building building in Noshville.Collection) { Console.WriteLine($@" {building.Address} Designed By {building.Designer} Constructed on {building.DateConstructed} Owned by {building.Owner} {building.Volume} meters of space "); } }
static void Main(string[] args) { Building FiveOneTwo = new Building("512 8th Avenue") { Stories = 4, Width = 40, Depth = 40 }; Building ThreeTwenty = new Building("320 11th Avenue S") { Stories = 3, Width = 100, Depth = 100 }; Building Laskov = new Building("35 Haim Laskov St") { Stories = 7, Width = 50, Depth = 50 }; FiveOneTwo.Construct(); ThreeTwenty.Construct(); Laskov.Construct(); FiveOneTwo.Purchase("Guy Cherkesky"); ThreeTwenty.Purchase("Guy Cherkesky"); Laskov.Purchase("Guy Cherkesky"); // Console.WriteLine(FiveOneTwo.Description); // Console.WriteLine(ThreeTwenty.Description); // Console.WriteLine(Laskov.Description); City nashville = new City("Nashville", "Guy Cherkesky", 1980); nashville.addBuilding(FiveOneTwo); nashville.addBuilding(ThreeTwenty); nashville.addBuilding(Laskov); foreach (Building building in nashville.allBuildings) { Console.WriteLine(building.Description); } }
static void Main(string[] args) { Building FiveOneTwoEigth = new Building("512 8th Avenue") { Stories = 10, Width = 3000, Depth = 1000, }; FiveOneTwoEigth.Construct(); FiveOneTwoEigth.Purchase("Jordan Hampton"); Building MySecondBuilding = new Building("111 1st Street") { Stories = 20, Width = 4000, Depth = 2000, }; MySecondBuilding.Construct(); MySecondBuilding.Purchase("Julie Whitford"); Building MyThirdBuilding = new Building("222 2nd Street") { Stories = 30, Width = 5000, Depth = 2000, }; MyThirdBuilding.Construct(); MyThirdBuilding.Purchase("Whitney Kelly"); City Megalopolis = new City("Megalopolis", "Sarah Landolt", "1985"); Megalopolis.addBuilding(FiveOneTwoEigth); Megalopolis.addBuilding(MySecondBuilding); Megalopolis.addBuilding(MyThirdBuilding); foreach (Building building in Megalopolis.CityBuildingsCollection) { Console.WriteLine(building.BuildingReport); } }
static void Main(string[] args) { Building FiveOneTwoEight = new Building("512 8th Avenue"); FiveOneTwoEight.Width = 500; FiveOneTwoEight.Depth = 600; FiveOneTwoEight.Stories = 5; Building FourTwoTwoSeven = new Building("422 7th Avenue"); FourTwoTwoSeven.Width = 200; FourTwoTwoSeven.Depth = 400; FourTwoTwoSeven.Stories = 3; Building OneNineThreeEight = new Building("193 8th Avenue"); OneNineThreeEight.Width = 1000; OneNineThreeEight.Depth = 2000; OneNineThreeEight.Stories = 10; FiveOneTwoEight._Construct(); FiveOneTwoEight._Purchase("Donald Trump"); FourTwoTwoSeven._Construct(); FourTwoTwoSeven._Purchase("Anonymous"); OneNineThreeEight._Construct(); OneNineThreeEight._Purchase("Jeff Bezos"); // FiveOneTwoEight.Print(); // FourTwoTwoSeven.Print(); // OneNineThreeEight.Print(); City Megalopolis = new City("Megalopolis"); Megalopolis.addBuilding(FourTwoTwoSeven); Megalopolis.addBuilding(OneNineThreeEight); foreach (Building taco in Megalopolis.Buildings) { taco.Print(); } }
static void Main(string[] args) { // Build this city City Splendor = new City("City of Splendor"); Splendor.electMayor("McCheese"); Building SignatureTower = new Building("501 Church Street"); SignatureTower.Width = 2500; SignatureTower.Depth = 1500; SignatureTower.Stories = 87; SignatureTower.Construct(); SignatureTower.Purchase("Giarratano"); Splendor.addBuilding(SignatureTower); Building MinasTirith = new Building("1234 Gondor Street"); MinasTirith.Width = 450; MinasTirith.Depth = 500; MinasTirith.Stories = 64; MinasTirith.Construct(); MinasTirith.Purchase("Saruman"); Splendor.addBuilding(MinasTirith); Building SplitLevel = new Building("1234 Street Place"); SplitLevel.Width = 785; SplitLevel.Depth = 576; SplitLevel.Stories = 2; SplitLevel.Construct(); SplitLevel.Purchase("Jim Bob Bonet"); Splendor.addBuilding(SplitLevel); Splendor.Greeting(); foreach (Building building in Splendor.allBuildings) { building.DisplayInformation(); Console.WriteLine(); } }
static void Main(string[] args) { Building numberOne = new Building("512 8th Avenue") { Stories = 3, Width = 45.5, Depth = 30.0, }; numberOne.Purchase("Joe Johnson"); Building numberTwo = new Building("634 8th Avenue") { Stories = 5, Width = 30.0, Depth = 27.75, }; numberTwo.Purchase("Lena Long"); Building numberThree = new Building("818 8th Avenue") { Stories = 2, Width = 75.0, Depth = 145.25, }; numberThree.Purchase("Derek Buckley"); City Megalopolis = new City("Megalopolis"); Megalopolis.addBuilding(numberOne); Megalopolis.addBuilding(numberTwo); Megalopolis.addBuilding(numberThree); foreach (Building building in Megalopolis.Buildings()) { building.BuildingReport(); } ; }
static void Main(string[] args) { Building fifty = new Building(); fifty.width = 30; fifty.depth = 80; fifty.stories = 4; fifty.createAddress("1000 4th Avenue"); fifty.publicAddress("1000 4th Avenue"); fifty.purchase("Bob Ross"); fifty.construct(); fifty.designer = "Sable"; Building twenty = new Building(); twenty.width = 20; twenty.depth = 40; twenty.stories = 5; twenty.createAddress("1000 8th Avenue"); twenty.publicAddress("1000 8th Avenue"); twenty.purchase("Dwayne Johnson"); twenty.construct(); twenty.designer = "Sable"; Building thirty = new Building(); thirty.width = 30; thirty.depth = 30; thirty.stories = 30; thirty.createAddress("30 30th Avenue"); thirty.publicAddress("30 30th Avenue"); thirty.purchase("30 Man"); thirty.construct(); thirty.designer = "Sable"; List <Building> buildingList = new List <Building>(); buildingList.Add(twenty); buildingList.Add(fifty); buildingList.Add(thirty); City greatPlace = new City(); greatPlace.name = "Great Place"; greatPlace.mayor = "Sable"; greatPlace.yearEstablished = 2019; greatPlace.addBuilding(twenty); greatPlace.addBuilding(thirty); greatPlace.addBuilding(fifty); foreach (Building singleBuilding in greatPlace.buildingsInCity) { Console.WriteLine($"{singleBuilding.address}"); Console.WriteLine("-------------"); Console.WriteLine($"Designed by {singleBuilding.designer}"); Console.WriteLine($"Constructed on {singleBuilding.constructionDate}"); Console.WriteLine($"Owned by {singleBuilding.private_owner}"); Console.WriteLine($"{singleBuilding.volume} cubic meters of space."); } }