public override string VisitSatellite(satellite concreteElementA) { string state = "bad"; if (concreteElementA.GetFuel() > 0) { state = "good"; } return("the state of fuel is :" + state); }
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(); }