cylindercurveface.java

来自「基于面向对象的数据库编程」· Java 代码 · 共 66 行

JAVA
66
字号
package brgeometry;

/**
 * <p>Title: Broundary Rrepresentaion</p>
 * <p>Description: this is the Use of OODB based Broundary Representaion</p>
 * <p>Copyright: Copyright (c) 2003</p>
 * <p>Company: USTC</p>
 * @author unascribed
 * @version 1.0
 */

public class CylinderCurveFace
    extends CurveFace {

  private BeelineEdge high;
  private RoundCurveEdge hemline;
 // public double area;
  public CylinderCurveFace(RoundCurveEdge hemline, BeelineEdge high) {
    this.hemline = hemline;
    this.high = high;
   this.setarea(this.getarea());
  }

  public CylinderCurveFace() {

  }

  //有关属性的操作

  public void setHigh(BeelineEdge high) {
    this.high = high;
  }

  public void setHemline(RoundCurveEdge hemline) {
    this.hemline = hemline;
  }

  public BeelineEdge gethigh() {
    return this.high;

  }

  public RoundCurveEdge gethemline() {
    return this.hemline;
  }

  //取得面积,这里针对柱面的具体的特性,实现具体的操作
  public double getarea() {
    return hemline.getLength() * high.getLength();
  }

  public double getRadius() {
    return hemline.getRadius();
  }

  public double getHigh() {
    return high.getLength();
  }

  private void translate() {}

  private void scale() {}

  private void rotate() {}

}

⌨️ 快捷键说明

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