Esempio n. 1
0
        public override string VisitSatellite(satellite concreteElementA)
        {
            string state = "bad";

            if (concreteElementA.GetFuel() > 0)
            {
                state = "good";
            }
            return("the state of fuel is :" + state);
        }
Esempio n. 2
0
        private void displayDataSat()
        {
            int location = satList.SelectedIndex;

            if (location < 1)
            {
                location = 1;
            }

            satellite sat = Program.station1.getList()[location];

            altitude.Text = sat.GetAltitude().ToString();
            fuel.Text     = sat.GetFuel().ToString();
            degree.Text   = sat.getLocation().ToString();
        }