Ejemplo n.º 1
0
        public override void Display()
        {
            m_bank             = new ChemicalDataBank();
            m_boilingPoint     = m_bank.GetCriticalPoint(m_chemical, "B");
            m_meltingPoint     = m_bank.GetCriticalPoint(m_chemical, "M");
            m_molecularWeight  = m_bank.GetMolecularWeight(m_chemical);
            m_molecularFormula = m_bank.GetMolecularStructure(m_chemical);

            base.Display();
            Console.WriteLine(" Formula: {0}", m_molecularFormula);
            Console.WriteLine(" Weight : {0}", m_molecularWeight);
            Console.WriteLine(" Melting Pt: {0}", m_meltingPoint);
            Console.WriteLine(" Boiling Pt: {0}", m_boilingPoint);
        }
Ejemplo n.º 2
0
        public override void Display()
        {
            //Adaptee
            _bank = new ChemicalDataBank();

            _boilingPoint       = _bank.GetCriticalPoint(_chemical, "B");
            _meltingPoint       = _bank.GetCriticalPoint(_chemical, "M");
            _molecularWeight    = _bank.GetMolecularWeight(_chemical);
            _molecularStructure = _bank.GetMolecularStructure(_chemical);

            base.Display();

            Console.WriteLine("Formulae : {0}", _molecularStructure);
            Console.WriteLine("Weight : {0}", _molecularWeight);
            Console.WriteLine("Boling Point : {0}", _boilingPoint);
            Console.WriteLine("Melting Point : {0}", _meltingPoint);
        }