//Copy Constructor public AddressClass(AddressClass right) { this.CStreetNumber = right.GetStreetNumber(); this.CStreetName = right.GetStreetName(); this.CCity = right.GetCity(); this.CProvince = right.GetProvince(); this.CZipcode = right.GetZipcode(); this.CCountry = right.GetCountry(); }
public BuildingClass(string VBuildingName, FloorClass VFloor, AddressClass VAddress) { CBuildingName = VBuildingName; for (int i = 0; i < 50; i++) { CFloor[i] = VFloor; } CAddress = VAddress; }
private void button1_Click(object sender, EventArgs e) { UnitClass UNTobj1 = new UnitClass(1, 4, 3, 3, 8, 34, "South"); MessageBox.Show(" \n" + UNTobj1.MakeString() + "\n"); AddressClass ADRobj2 = new AddressClass(155, "Georgia", "Vancouver", "BC", "U6F 3F5", "Canada"); MessageBox.Show(" \n" + ADRobj2.MakeString() + "\n"); BuildingClass BLDObj2 = new BuildingClass(); MessageBox.Show(" \n" + BLDObj2.MakeString() + "\n"); FloorClass FLRObj1 = new FloorClass(); MessageBox.Show(" \n" + FLRObj1.MakeString() + "\n"); }
public void SetAddress(AddressClass VAddress) { CAddress = VAddress; }
//Copy Constructor public BuildingClass(BuildingClass right) { this.CBuildingName = right.GetBuildingName(); this.CFloor[i] = right.GetFloor(50); this.CAddress = right.GetAddress(); }