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

📄 queue.java

📁 一个飞机调度员模拟训练程序,可以添加跑道数量,控制飞机飞行的速度.默认的密码可以在AtcSystem类里面修改,其中内置了三个用户名.这套系统是我和几个国外同学合力开发的,希望对大家有帮助
💻 JAVA
字号:
import javax.swing.*;
import java.awt.*;
import java.awt.event.*;
import java.lang.InterruptedException;
import java.awt.geom.Line2D.Float;
/**
 * A simulated queue of planes.
 * 
 * @author James M. Clarke  
 * @version 02/03/2007
 */
public class Queue
{
    // instance variables - replace the example below with your own
    private Position start;
    private float angle;

    /**
	 * Constructor for Queue objects
	 * Aircraft join the queue at a specific position and pointing in a particular direction, and turn clockwise until told to leave the Queue.
	 * 
	 * @param  where  the starting point of the queue, that is, where planes enter the queue
	 * @param  direction  the direction in which planes are travelling when they join the queue, in radians clockwise from the y-axis
	 */
    public Queue(Position where, float direction)
    {       
        start = where;
        angle = direction;
    }
    
     /**
	 * Accessor method for the position where aircraft join the Queue
	 * 
	 * @return     the position where aircraft join the Queue
	 */    
    public Position getPosition()
    {
        return start;
    }
    
     /**
	 * Accessor method for the angle in which the aircraft at moving when they join the queue
	 * 
	 * @return     angle in which the aircraft at moving when they join the queue, in radians clockwise from the y-axis
	 */      
    public float getAngle()
    {
        return angle;
    }
}

⌨️ 快捷键说明

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