登录
首页 » Java » JAVA

JAVA

于 2021-05-07 发布
0 359
下载积分: 1 下载次数: 0

代码说明:

说明:  定义长方体类Cuboid,要求如下:(1)私有成员变量包括长length、宽width和高height;(2)构造方法包括一个公共的空构造方法,一个能够初始化所有成员变量的构造方法;(3)包括所有的setter和getter方法,其中setter方法要求对形参进行验证,例如长、宽和高都大于0;(4)功能方法包括计算表面积getArea()、计算体积getCubage()、判断是否正方体isCube()、输出该长方体的长宽高printCuboid()、绘制该长方体(给出提示信息即可)drawing()。 测试一要求如下:(1)利用空构造方法创建一个新的长方体对象cuboidA,然后利用setter方法设置长宽高分别为1.5、2.6和18.6,(2)调用printCuboid()方法输出cuboidA的基本信息,调用isCube()方法判断是否正方体;(3)调用方法drawing()模拟绘制该长方体。 测试二要求如下:(1)利用构造方法创建一个具有长宽高分别为2.5、6.8和8.0的长方体对象cuboidB,然后利用setLength()方法修改length为4.6;(2)调用getArea()方法计算表面积;(3)调用getCubage计算该长方体的体积。(The cuboid class cuboid is defined as follows: (1) the private member variables include length, width and H eight; (2) the construction method includes a public empty construction method, a construction method that can initialize all member variables; (3) all setter and getter methods are included, where the setter method requires to verify the parameters, such as length, width and height are greater than 0 (4) the function methods include calculating the surface area getarea (), calculating the volume getcube (), judging whether the cube is iscube (), outputting the length, width and height printcube (), drawing the box (just give the prompt information) drawing ().)

下载说明:请别用迅雷下载,失败请重下,重下不扣分!

发表评论

0 个回复

  • 有限元基础教程 曾攀 光盘资料
    曾攀,有限元基础教程里面全部的编程代码,对有限元初学者十分有帮助(Basic Course of Finite Element)
    2021-04-28 14:28:43下载
    积分:1
  • will automatically delete the directory of debug
    will automatically delete the directory of debug
    2023-05-20 23:50:04下载
    积分:1
  • 大连理工出版社,数据结构与算法(第三版)ppt
    大连理工出版社,数据结构与算法(第三版)ppt-Dalian Science and Technology Press, Data Structures and Algorithms (third edition) ppt
    2022-02-22 07:30:26下载
    积分:1
  • 除以32位整数16bit整数数签署。输入数据…
    32bit有符号整数除以16bit整数。 输入数据为被除数Num和除数Den, 输出数据为商Quot和余数Rem。-Divided by the number of signed 32bit integer 16bit integer. Input data for the dividend divisor Num and Den, output data for more than a few business Quot and Rem.
    2022-03-25 07:43:00下载
    积分:1
  • DBF
    说明:  MVDR算法DREC算法,可以从图形上有效的看出来DBF算法的仿真结果。(MVDR algorithm DREC algorithm.The simulation results of DBF algorithm can be seen from the graph effectively.)
    2020-01-06 16:05:49下载
    积分:1
  • PLCOperator
    说明:  与NJ系列PLC通讯上位机软件给予指令位置,与PLC 通讯并发送位置指令,伺服电机为负载(Communication with NJ series PLC upper computer software gives instruction position, communicates with PLC and sends position instruction. Servo motor is the load.)
    2020-06-25 04:40:02下载
    积分:1
  • matlab Manchest编码实现的m 文件
    matlab Manchest编码实现的m 文件-matlab Manchest coding realize the m file
    2023-04-23 02:55:04下载
    积分:1
  • 这个是斗地主的游戏,还没有全部完成,希望多多指教
    这个是斗地主的游戏,还没有全部完成,希望多多指教-this is a game, has completed the hope that the exhibitions
    2022-02-11 20:51:13下载
    积分:1
  • yzmcms火车头发布配置
    说明:  yzmcms火车头发布配置,火车头采集yzmcms规则(Yzmcms locomotive release configuration)
    2021-03-12 12:19:24下载
    积分:1
  • java逼真雷电游戏
    java逼真雷电游戏,界面是不是很酷,和真正的雷电几乎一样,玩法也一样,那种炸弹爆炸场景和飞机灵敏的飞行控制,堪称完善了,搞Java手机游戏的新人必看。
    2022-05-19 00:37:49下载
    积分:1
  • 696516资源总数
  • 106914会员总数
  • 0今日下载