Example #1
0
        private static void testAbstractFurniture()
        {
            Console.WriteLine("\n# testAbstractFurniture()");
            AbstractFurniture table = new Table("Tango", Room.Kitchen, Material.Oak, new Size(80, 90, 100), 120, 4, false, true);
            Console.WriteLine(table);
            AbstractFurniture wardrobe = new Wardrobe("John", Room.Bedroom, Material.CherryTree, new Size(50, 160, 90), 180, 3, DoorType.Sliding, true, false);
            Console.WriteLine(wardrobe);
            AbstractFurniture bed = new Bed("Foxtrot", Room.LivingRoom, Material.Pine, new Size(100, 45, 210), 230, Mattress.Healthy, false, true, false);
            Console.WriteLine(bed);

            Program.sellFurniture(table, 1);
            Program.sellFurniture(wardrobe, 2);
            Program.sellFurniture(bed, 1);
        }
Example #2
0
 public bool Equals(Wardrobe that)
 {
     if ((object)that == null)
     {
         return false;
     }
     if (base.Equals(that))
     {
         if (that.numberOfShelves == this.numberOfShelves && that.typeOfDoor == this.typeOfDoor && that.mirror == this.mirror && that.builtInLamp == this.builtInLamp)
         {
             return true;
         }
     }
     return false;
 }