登录
首页 » Java » JAVA

JAVA

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

  • countless blisters constantly rising from the bottom, but can be torn blisters,...
    无数水泡不断从水底升起,而且水泡是可以弄破的,点击水泡就可以看见破裂-countless blisters constantly rising from the bottom, but can be torn blisters, click on the blisters can see rupture
    2022-03-19 16:39:39下载
    积分:1
  • 股票交易买卖批量下单保存,察看交易数量和金额
    股票交易买卖批量下单保存,察看交易数量和金额-Stock trading volume under the single-preservation, to see the number of transactions and amount of
    2022-03-02 05:56:21下载
    积分:1
  • 源程序(.m文件)
    说明:  matlab绘制信号的拉普拉斯变换,程序5个(matlab plot signal Laplace transform, one of the procedures)
    2020-03-03 18:34:49下载
    积分:1
  • prepared by the Three Kingdoms vb source. Study of the Three Kingdoms player hel...
    用vb编写三国志源码.对研究三国志的玩家很有帮助-prepared by the Three Kingdoms vb source. Study of the Three Kingdoms player helpful
    2022-05-30 05:50:33下载
    积分:1
  • 首先,你应该确保你的系统中已经建立了交叉编译环境,如果没有或者是还有什么问题可以搜索相关的内容, 本文是教你在嵌入式系统痛中如何移植minigui1.3,...
    首先,你应该确保你的系统中已经建立了交叉编译环境,如果没有或者是还有什么问题可以搜索相关的内容, 本文是教你在嵌入式系统痛中如何移植minigui1.3, 关于2.0版本是付费的版本,跟1.3版本有很大的差别,所以本文的方法只能适合在1.3和1.6的移植当中, 下面开始。。。。。。。。。。。。。。。。。。。。。。。》 -First, you should ensure that your system has established a cross-compiler environment, If not, or is there any problem can search the contents, This article is to teach you in Embedded Systems pain minigui1.3 how to transplant, Version 2.0 of the payment is the version with the 1.3 version of a great difference. Therefore, the method can only be suitable for the 1.3 and 1.6 of the transplant, the following start. . . . . . . . . . . . . . . . . . . . . . . "
    2022-03-12 14:02:27下载
    积分:1
  • 程序
    说明:  基于结构光相移法的三维重建程序,matlab编码,由于要的可以下载一下(Based on the structured light phase-shift method of three-dimensional reconstruction program, matlab coding, because you can download it)
    2019-10-17 15:40:18下载
    积分:1
  • ANSYS--errors-and-solutions
    该文件为ansys常见错误提示及其解决办法(ANSYS common operation errors and their solutions)
    2014-05-17 09:56:06下载
    积分:1
  • FPGA原理图和PCB
    FPGA原理图和PCB
    2021-05-06下载
    积分:1
  • 1809544768
    说明:  AUE VSEM PRIVET I POKA YA NE PRIDU
    2019-12-30 15:01:12下载
    积分:1
  • FORC
    说明:  一阶反转曲线图谱是基于Preisach数学模型的建立实现的(The first-order inversion curve graph is based on Preisach model and realized through the establishment of mathematical model)
    2020-07-02 07:20:02下载
    积分:1
  • 696516资源总数
  • 106914会员总数
  • 0今日下载