登录
首页 » Java » JAVA

JAVA

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

  • 根据数据库发送条屏数据.根据呼叫发送特定的信息.
    根据数据库发送条屏数据.根据呼叫发送特定的信息.-In accordance with Article Send screen data database. According to the call to send a particular message.
    2023-02-13 05:10:03下载
    积分:1
  • seg2数据格式,希望对于学相关数据格式的人有用
    seg2数据格式,希望对于学相关数据格式的人有用-seg2 data format, data for the study were useful format
    2023-08-25 15:40:03下载
    积分:1
  • FCN.tensorflow-master.tar
    its a code packages for image segmentaion
    2017-11-24 21:49:14下载
    积分:1
  • ADS1292R 资料
    说明:  用于生物电势测量的 ADS129x 低功耗、双通道、24 位模拟前端 数据表 (Rev. C) ADS1292R应用范围:医疗测量仪器(心电图图(ECG))包括:病人看护:动态心电图图(Holter)、、事件、应激、和包括心电图图(ECG)在在内的生命体征、自动体外除颤器、和远程医疗。体育运动和健身(心率、呼吸、和和ECG)高精度、同步、多通道信号采集。(Ads129x for biological potential measurement)
    2020-11-09 14:08:11下载
    积分:1
  • 自由软件 非常好的文本编译器
    自由软件 非常好的文本编译器-very good free software compiler version
    2022-09-24 17:25:03下载
    积分:1
  • 分数阶 dspace
    DSPACE的一些文章,对DSPACE有兴趣的人可以借鉴借鉴(some literature about dspace)
    2021-01-02 20:48:57下载
    积分:1
  • PD_Barker_yundongbuchanghoumy
    说明:  对于PD雷达导引头前端,在没有噪声情况下的雷达回波信号,经过运动补偿后再进行脉冲压缩处理,得到某一周期的仿真图像(PD radar seeker for the front-end, in the absence of noise under the radar echo signal, after a motion compensation for pulse compression and then processed by the image of a cycle simulation)
    2021-04-18 11:48:57下载
    积分:1
  • PQ_examples
    pscad的介绍和培训教程,希望对大家有用(PSCAD introduction)
    2013-05-14 20:35:51下载
    积分:1
  • 4 chapter example code
    说明:  《点云库PCL学习教程》资料,包含第四章源代码(PCL study,the code of chapter 4)
    2020-04-30 22:57:26下载
    积分:1
  • GPSRTK with observational data, an observation station dozens of Epoch, a lot of...
    用GPSRTK观测数据时,一个站观测几十个历元,一天观测了很多站,回家导出数据到本程序,可统计出所有的点名及每个点的观测的 精度。-GPSRTK with observational data, an observation station dozens of Epoch, a lot of day observation stations, Export of data to the home of the procedures, all the statistics and the name of each observation point accuracy.
    2022-01-22 02:37:02下载
    积分:1
  • 696516资源总数
  • 106914会员总数
  • 0今日下载