登录
首页 » Java » JAVA

JAVA

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

  • odrViewer64.1.9
    说明:  odrviewer orginal for openDrive
    2021-01-05 10:08:54下载
    积分:1
  • Rts
    关于时间序列分析的一些比较简单的例子,有注释。使用R语言编写。(Some examples of time series in R)
    2020-06-30 11:40:02下载
    积分:1
  • 电机振动电流信号采集
    Labview双通道信号采集,实现双通道同时采集与数据保存,简单易用(Labview dual channel signal acquisition, double channel simultaneous acquisition and data storage, simple and easy to use)
    2017-11-20 12:57:40下载
    积分:1
  • altera_reed_solomon_design
    altera 的reed solomn 设计(reed solomn design from altera)
    2009-06-14 15:39:32下载
    积分:1
  • 大漠插件注册包
    TC编程教材,代码已经打包好了,插件都i是好的 直接可以用的 使用TC5.0版本以上(tc leaugh teacher file)
    2020-06-22 18:40:01下载
    积分:1
  • 单例模式-工具箱01
    c# barcode generator for net application
    2020-06-24 08:20:02下载
    积分:1
  • finish
    学生成绩管理系统,输入输出等,排序求值等。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。(student magnement system)
    2013-05-22 11:55:25下载
    积分:1
  • LED 驱动器AS3693的控制器代码。适合做LED控制的人
    LED 驱动器AS3693的控制器代码。适合做LED控制的人-spi interface for led driver as3693
    2022-04-21 02:13:16下载
    积分:1
  • dspic30f6014
    dspic30f6014a的应用文章,是绝对的有用.多6014的应用有很深入的解答.我也是在网上无意发现的.-dspic30f6014
    2022-01-22 05:14:29下载
    积分:1
  • wp-postviews汉化版_浏览次数统计插件
    说明:  wp-postviews汉化版_浏览次数统计插件(The plug-in can count the number of visits to each article. According to the number of visits, it can display the hottest or the weakest rankings of articles in history. The scope of the display can be all articles and pages. When the plug-in is enabled, it automatically generates a small tool in the appearance-gadget. You can drag it to the sidebar to build a reading ranking and a popular collection waiting column.)
    2019-04-08 14:57:20下载
    积分:1
  • 696518资源总数
  • 106155会员总数
  • 8今日下载