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

📄 test.java~1~

📁 基于面向对象的数据库编程
💻 JAVA~1~
字号:
package operation;import brgeometry.*;import com.versant.trans.*;import java.util.*;import helper.ProBag;import com.versant.fund.*;import com.versant.trans.*;/** * <p>Title: Broundary Rrepresentaion</p> * <p>Description:  这是一个客户端的测试程序</p> * <p>Copyright: Copyright (c) 2003</p> * <p>Company: USTC</p> * @author unascribed * @version 1.0 */public class test {  public test() {  }  public static void main(String[] args) {    double   length=3;    double   width=4;    double   high=5;    double   newLength=9;    double   radius=6;    double   times=3;    test     test1 = new test();    String   myCuboid=null;    //产生属性包    ProBag proBag=new ProBag();    proBag.setHigh(high);    proBag.setLength(length);    proBag.setWidth(width);    //产生一个长方体对象并测试它    Manager man=new CoboidPlaneSolidMan();//获得一个对于体操作的接口,(长方体)    Solid s1=man.create(); //生成一个长方体对象    s1.init(proBag);       //用给定的值初始化它    //查询这个长方体的属性的值    s1=man.findByRoot(myCuboid);    ProBag p1=s1.getPro(myCuboid);    System.out.println("before the modify      :");    System.out.println("length :"+p1.getLength());    System.out.println("width:"+p1.getWidth());    System.out.println("high :"+p1.getHigh());    //修改属性的值    proBag.setLength(newLength);    //修改长方体的属性    man.modifyByRoot(myCuboid,proBag);    //查询这个长方体的属性的值    s1=man.findByRoot(myCuboid);    s1.getPro(myCuboid);    ProBag p2=s1.getPro(myCuboid);    System.out.println("after the modify       :");    System.out.println("length :"+p2.getLength());    System.out.println("width  :"+p2.getWidth());    System.out.println("high   :"+p2.getHigh());    //缩放这个长方体    s1.scale(myCuboid,times);    //查询这个长方体的属性的值    s1=man.findByRoot(myCuboid);    s1.getPro(myCuboid);    ProBag p3=s1.getPro(myCuboid);    System.out.println("after the modify       :");    System.out.println("length :"+p3.getLength());    System.out.println("width  :"+p3.getWidth());    System.out.println("high   :"+p3.getHigh());    //删除这个长方体对象    man.deleteByRoot(myCuboid);//****************下面的大同小异    //产生一个立方体对象    //产生一个圆柱体对象    //产生一个圆锥体对象    //产生一个球体对象    //改变一个对象的属性  }}

⌨️ 快捷键说明

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