Пример #1
0
 //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();
 }
Пример #2
0
 public BuildingClass(string VBuildingName, FloorClass VFloor, AddressClass VAddress)
 {
     CBuildingName = VBuildingName;
     for (int i = 0; i < 50; i++)
     {
         CFloor[i] = VFloor;
     }
     CAddress = VAddress;
 }
Пример #3
0
        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");
        }
Пример #4
0
 public void SetAddress(AddressClass VAddress)
 {
     CAddress = VAddress;
 }
Пример #5
0
 //Copy Constructor
 public BuildingClass(BuildingClass right)
 {
     this.CBuildingName = right.GetBuildingName();
     this.CFloor[i]     = right.GetFloor(50);
     this.CAddress      = right.GetAddress();
 }