Ejemplo n.º 1
0
 static public void ShowSoket(Soket soket)
 {
     Console.WriteLine("Applicies that soked:\n");
     for (int i = 0; i < soket.GetAppliances().Count(); i++)
     {
         Console.WriteLine("Name of appliance: \n" + soket.GetAppliances()[i].Name);
         Console.WriteLine("Powerty of appliance: " + soket.GetAppliances()[i].getPower() + " Вт\n");
         if (soket.GetAppliances()[i] is Computer)
         {
             Computer c = new Computer();
             c = (Computer)soket.GetAppliances()[i];
             Console.WriteLine("Fideo frequency: " + c.getVideoFrequency() + " MHz\n");
             Console.WriteLine("Digit: " + c.GetDigit() + " Bit\n");
         }
         if (soket.GetAppliances()[i] is Telephone)
         {
             Telephone t = new Telephone();
             t = (Telephone)soket.GetAppliances()[i];
             Console.WriteLine("Transdurance Resistance: " + t.getTransducerResistance() + " KOhm\n");
             Console.WriteLine("Digit: " + t.GetDigit() + " Bit\n");
         }
         if (soket.GetAppliances()[i] is Refrigerator)
         {
             Refrigerator r = new Refrigerator();
             r = (Refrigerator)soket.GetAppliances()[i];
             Console.WriteLine("Temperature coefficient of Zener diode: " + r.getTemperatureСoefficient() + "\n");
             Console.WriteLine("Anchor Resistance: " + r.getAnchorResistance() + " KOhm\n");
         }
         if (soket.GetAppliances()[i] is Microwave)
         {
             Microwave m = new Microwave();
             m = (Microwave)soket.GetAppliances()[i];
             Console.WriteLine("Temperature coefficient of Zener diode: " + m.getTemperatureСoefficient() + "\n");
             Console.WriteLine("Efficiency of Magnetron: " + m.getMagnetronEfficiency() + " %\n");
         }
     }
     Console.WriteLine("Powerty = " + soket.GetSumPowerty() + " Вт");
 }