Example #1
0
        public RichCompound(string chemical)
        {
            this.chemical = chemical;
            this.bank = new ChemicalDatabank();

            this.boilingPoint = this.bank.GetCriticalPoint(this.chemical, "B");
            this.meltingPoint = this.bank.GetCriticalPoint(this.chemical, "M");
            this.molecularWeight = this.bank.GetMolecularWeight(this.chemical);
            this.molecularFormula = this.bank.GetMolecularStructure(this.chemical);
        }
        public RichCompound(string chemical)
        {
            this.chemical = chemical;
            this.bank     = new ChemicalDatabank();

            this.boilingPoint     = this.bank.GetCriticalPoint(this.chemical, "B");
            this.meltingPoint     = this.bank.GetCriticalPoint(chemical, "M");
            this.molecularWeight  = this.bank.GetMolecularWeight(chemical);
            this.molecularFormula = this.bank.GetMolecularStructure(chemical);
        }
Example #3
0
        public override void Display()
        {
            // The Adaptee
            chemicalDatabank = new ChemicalDatabank();

            boilingPoint     = chemicalDatabank.GetCriticalPoint(chemical);
            molecularFormula = chemicalDatabank.GetMolecularStructure(chemical);

            base.Display();
            Console.WriteLine("Formula: {0}", molecularFormula);
            Console.WriteLine("Boiling Point: {0}", boilingPoint);
        }
Example #4
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);
 }
Example #5
0
        public override void Display()
        {
            _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);
        }