void setHeading (int angle) { heading = angle % 360; // make sure angle is in the range 0-359 degrees if (heading < 0) heading = heading + 360; } int getHeading( ) { return heading; } // print information about the flight void printFlight () { System.out.println(altitude + / + heading + / + speed); }