登录
首页 » Java » JAVA

JAVA

于 2021-05-07 发布
0 218
下载积分: 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 个回复

  • kubo公式推导石墨烯电导率
    采用matlab计算石墨烯电导率的Kubo公式(Ku-bo formula was used to simulate graphene conductivity in matlab)
    2021-05-13 19:30:02下载
    积分:1
  • 从文件读取文法并判断文法中的终结符和非终结符,并输出
    从文件读取文法并判断文法中的终结符和非终结符,并输出-none
    2022-06-18 03:03:37下载
    积分:1
  • avr mega128 射频控制板代码
    这个代码是射频 1 兆赫控制板控制时间和功率射频波,包含 ui、 键盘控制、 零交叉、 射频发生器
    2022-03-18 14:23:31下载
    积分:1
  • numberAnimate
    说明:  一款jQuery数字滚动、跳动累加递减动画,应用于响应式网页滚动到制定位置数字跳动动画特效(JQuery Digital Rolling and Jumping Accumulative Decreasing Animation for Responsive Web Page Rolling to Set Position Digital Jumping Animation Special Effects)
    2019-05-06 09:55:32下载
    积分:1
  • gao_du_cha
    说明:  天文导航高度差法求舰位程序,内附说明文档与理论分析(Height difference between celestial navigation procedures ship method, containing documentation and theoretical analysis)
    2020-09-29 16:17:45下载
    积分:1
  • WK2114-DS-CN-V010-2014-10-25
    wk2114资料文档,便于开发时进行查询,并且进行学习(Wk2114 data file, which is easy to query and query when developing.)
    2018-04-16 17:09:56下载
    积分:1
  • 这个是用C编写的Atmega169的EEPROM的读写程序!
    这个是用C编写的Atmega169的EEPROM的读写程序!-This is prepared by C the Atmega169 the EEPROM read and write procedures!
    2022-02-05 12:30:27下载
    积分:1
  • HPGL
    用于激光扫描的RTC5振镜控制程序,带界面(RTC5 Galvanometer Control Program for Laser Scanning with Interface)
    2019-03-24 20:21:57下载
    积分:1
  • exata crack
    c++ 和 exata 的联合调试软件,和自己的调试方法,主要对重新编译这里经行了说明(c++ and exatahe joint debugging of the software, and their own debugging methods, mainly for the recompilation of this line)
    2018-10-10 15:22:50下载
    积分:1
  • 仓库条码管理系统
    条码仓库管理系统,特别适合中小型超市,解决了库存、入库、出库、库存查询、数据报表等大量人工需要完成的事情,现在只需要轻轻的点几下鼠标就能完成,大量节约了人力和物力,实现了无纸化的操作,能把出库入库报表打印出来或导出为excel,更加直观和省时。(Bar code warehouse management system, especially suitable for small and medium-sized supermarkets, has solved a large number of manual tasks such as inventory, warehousing, warehousing, inventory query, data report forms and so on. Now it can be accomplished with a few clicks of the mouse. It saves a lot of manpower and material resources, realizes paperless operation, and can print out or export the warehouse report forms into excel, which is more intuitive and more intuitive. Time saving.)
    2019-03-21 17:22:13下载
    积分:1
  • 696518资源总数
  • 104444会员总数
  • 15今日下载