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

📄 location.java

📁 西电科大的基于java面向对象教程
💻 JAVA
字号:
public class Location{
	private int x;
	private int y;

	public Location(int newX,int newY){
		setX(newX);
		setY(newY)
	}

	public Location(){
	}

	public int getX(){
		return x;
	}

	public int getY(){
		return y;
	}

	public boolean equal(Point other){
		return other.x==this.x&&
				other.y==this.y;
	}

	public void xMove(int amount){

	}

	public void yMove(int amount){
		y+=amount;
	}

	private void setX(int x){
		this.x=x;
	}

	private void setY(int y){
		this.y=y;
	}
}

⌨️ 快捷键说明

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