📄 shape.java
字号:
// Shape class: meant to be a super class for shapes that can act
import java.awt.*;
public class Shape
{
protected int xpos;
protected int ypos;
public Shape( )
{
xpos = 0;
ypos = 0;
}
public Shape( int x, int y )
{
xpos = x;
ypos = y;
}
public void moveRight()
{
xpos += 5;
}
public void moveLeft()
{
xpos -= 5;
}
public void act()
{
}
public void draw( Graphics g )
{
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -