📄 trafficlight.java
字号:
import java.applet.Applet;
import java.awt.*;
import java.awt.event.*;
import javax.swing.*;
/**
* TrafficLight class keeps all lights
*
* @author Hao Chen
* @version 1.0
*/
public class TrafficLight
{
public int light;
/**
* Creates a TrafficLight class and sets the light
*
* @param light: the color of the light
*/
public TrafficLight( int light)
{
this.light = light;
}
/**
* Return the light type
*
* @param light: the color of the light
*/
public int GetLight ()
{
return light;
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -