⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 aircraftevent.java

📁 一个飞机调度员模拟训练程序,可以添加跑道数量,控制飞机飞行的速度.默认的密码可以在AtcSystem类里面修改,其中内置了三个用户名.这套系统是我和几个国外同学合力开发的,希望对大家有帮助
💻 JAVA
字号:
import java.util.concurrent.*;  
/**
 * An instruction from the GUI to the simulation that an aircraft in the simulation should change state.
 * A null aircraft and a state of 999 can be used for testing purposes to instruct the simulation to create a new aircraft.
 * A null runway can be provided for any instruction apart from landing.
 * 
 * @author James M. Clarke  
 * @version 02/03/2007
 */
public class AircraftEvent
    {
        private Aircraft myAircraft;
        private int state;
        private Runway myRunway;
        public final static int LAND = 0;
        public final static int TURNLEFT = 1;
        public final static int TURNRIGHT = 2;
        public final static int GOTOQUEUE = 3;
        public final static int LEAVE = 6;
        public final static int ADD = 999;
        
        /**
         * Constructor for AircraftEvent objects
         * @param  a which aircraft should change state
         * @param  i the state the aircraft should change to
         * @param  r the runway the aircraft should change to
         */         
        public AircraftEvent(Aircraft a, int i, Runway r)
        {
               myAircraft = a;
               state = i;
               myRunway = r;
        }

        /**
         * Accessor method for the state that the aircraft should be changed to
         * 
         * @return     the state that the aircraft should be changed to
        */         
        public int getState()
        {
            return state;
        }
        
        /**
         * Accessor method for the Aircraft whose state should be changed
         * 
         * @return     the Aircraft whose state should be changed
        */         
        public Aircraft getAircraft()
        {
            return myAircraft;
        }
        
        /**
         * Accessor method for the Runway the aircraft should land at
         * 
         * @return     the Aircraft whose state should be changed
        */         
        public Runway getRunway()
        {
            return myRunway;
        }
        
    }

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -