コード例 #1
0
        public void lancementChauffe()
        {
            int difference;
            int condition = 0;

            a_feu.set_PutOnFire(a_recipient);
            a_feu.affiche_feu();

            while (a_feu.get_degreCourant() < a_recipient.get_temperaturEbulitionLiquide())
            {
                a_feu.chauffe_feu(a_liquide.get_degreEbullition());
                Console.WriteLine("La temperature actuelle de la plaque est de: {0}\n", condition);
                System.Threading.Thread.Sleep(1000);
                if (condition < a_feu.get_degreCourant())
                {
                    condition = a_feu.get_degreCourant();
                    Console.WriteLine("La temperature actuelle de la plaque est de: {0}\n", condition);
                }
            }

            if (a_feu.get_degreCourant() > a_recipient.get_temperaturEbulitionLiquide())
            {
                difference = a_feu.get_degreCourant() - a_recipient.get_temperaturEbulitionLiquide();
                Console.WriteLine("La temperature va baisser de: {0} \n", difference);
                a_feu.set_degreCourant(difference);
            }
            a_feu.affiche_feu();

            double temperature = a_recipient.get_temperatureLiquideContenu();

            while (a_recipient.get_temperatureLiquideContenu() < a_recipient.get_temperaturEbulitionLiquide())
            {
                a_feu.maintenirFeu(temperature);
                temperature = a_recipient.get_temperatureLiquideContenu();
                Console.WriteLine("La temperature du liquide est de {0} degrés \n", a_recipient.get_temperatureLiquideContenu());
            }
            Console.WriteLine("\n\nTemperature d'ebullition atteinte, l'evaporation commence : \n\n\n");

            double diminution = a_recipient.get_volumeActuel();

            while (a_recipient.get_volumeActuel() > 0)
            {
                diminution = a_recipient.get_volumeActuel() - (a_recipient.get_coefficientLiquideContenut() / (a_recipient.get_coefficientLiquideContenut() - 1));
                a_recipient.set_volumeActuel(diminution);

                if (a_recipient.get_volumeActuel() < 0)
                {
                    a_recipient.set_volumeActuel(0);
                }

                System.Threading.Thread.Sleep(1000);
                Console.WriteLine("Le recipient contient actuellement {0}  cl \n", a_recipient.get_volumeActuel());
            }
            Console.ReadLine();
        }
コード例 #2
0
ファイル: Basic Class.cs プロジェクト: SoKaii/SmartPlaque
 public void set_volumeAcutuelFeu(double f_volume)
 {
     recipient.set_volumeActuel(f_volume);
 }