Exemplo n.º 1
0
        public override void Display()
        {
            boilingPoint     = ChemicalDatabank.GetCriticalPoint(chemical, "B");
            meltingPoint     = ChemicalDatabank.GetCriticalPoint(chemical, "M");
            molecularWeight  = ChemicalDatabank.GetMolecularWeight(chemical);
            molecularFormula = ChemicalDatabank.GetMolecularStructure(chemical);

            base.Display();
            Console.WriteLine($" Formula: {molecularFormula}");
            Console.WriteLine($" Weight : {molecularWeight}");
            Console.WriteLine($" Melting Pt: {meltingPoint}");
            Console.WriteLine($" Boiling Pt: {boilingPoint}");
        }
Exemplo n.º 2
0
        public override void Display()
        {
            // The Adaptee

            _bank = new ChemicalDatabank();

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

            base.Display();
            Console.WriteLine(" Formula: {0}", _molecularFormula);
            Console.WriteLine(" Weight : {0}", _molecularWeight);
            Console.WriteLine(" Melting Pt: {0}", _meltingPoint);
            Console.WriteLine(" Boiling Pt: {0}", _boilingPoint);
        }