Exemple #1
0
        public virtual void ShowHouse()
        {
            int    bathrooms         = 0;
            int    bedrooms          = 0;
            int    kitchens          = 0;
            int    livingrooms       = 0;
            double totalbuildingping = 0;

            Land.ShowLand();

            totalbuildingping = TotalPings();

            foreach (Room aRoom in Rooms)
            {
                switch (aRoom.Roomtype)
                {
                case Room.roomtype.Bathroom:
                    bathrooms++;
                    break;

                case Room.roomtype.Bedroom:
                    bedrooms++;
                    break;

                case Room.roomtype.Kitchen:
                    kitchens++;
                    break;

                case Room.roomtype.Livingroom:
                    livingrooms++;
                    break;

                default:
                    bedrooms++;
                    break;
                }
            }

            //Console.WriteLine($"TotalBuildingPing={totalbuildingping}");
            //Console.WriteLine($"Bedroom={bedrooms}");
            //Console.WriteLine($"Livingroom={livingrooms}");
            //Console.WriteLine($"Kitchen={kitchens}");
            //Console.WriteLine($"Bathroom={bathrooms}");
            //Console.WriteLine("");
        }
Exemple #2
0
 public House(Land land, housetype housetype, int floors)
 {
     Land   = land;
     Floors = floors;
 }