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

📄 archfind.java

📁 java写的Archreport
💻 JAVA
字号:
/**	File Name:    	ArchFind.java	Author:	黄增博   #B02251132	Date:		March 20 2004	Description:	The ArchFind class records information about archeological                        finds. Specifically it records the x-position, y-position,                        depth of find and a descriptive name.**/class ArchFind{	private double xPos, yPos; // location of find	private double depth;	//depth of find	private String name;	// the find's name	public ArchFind(double x, double y, double d, String n){		xPos=x;		yPos=y;		depth= d;		name =  n;	}	public String getName(){return name;}	public double getXPos(){return xPos;}	public double getYpos(){return yPos;}        public double getDepth(){return depth;}// give the depth	/*returns the distance between two finds */	public double distanceBetween(ArchFind other){	return Math.sqrt(Math.pow(xPos-other.getXPos(),2)+Math.pow(yPos-other.getYpos(),2));	}//work out the distence	/*return a String presentation */	public String toString(){		return "name: " + name + " (" + xPos + "," + yPos + "," + depth + ")";	}}

⌨️ 快捷键说明

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