登录
首页 » Java » JAVA

JAVA

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

  • PCA_Mohan
    说明:  一个简单的代码,一步一步地进行主成分分析,并给出了解释..pca的内置功能用于。此外,代码中还解释了显示如何进行主成分分析的分步过程。(A simple code for doing PCA with step by step procedure along with explanations is given for an novoice to PCA.. The inbuilt function pca is used to. Further a step by step procedure showing how PCA is done is explained in the code.)
    2020-05-13 19:51:31下载
    积分:1
  • 语音信号
    说明:  语音信号实验 语音信号采集 LPC编解码实验 线性预测分析 短时时域分析(Speech signal experiment)
    2020-06-29 18:05:00下载
    积分:1
  • COLOR-CRDNT
    Bit Color Pointer Localiton Color
    2011-05-15 18:05:37下载
    积分:1
  • rtsp-h264
    rtsp2h264,r,基于海思平台可开发(base hisiv500 platform ,rtsp2h264. this is c programe)
    2020-06-24 23:40:01下载
    积分:1
  • calculator
    用Matlab GUI实现计算器的功能,包括.m与.fig文件(Use Matlab GUI to achieve the function of calculator)
    2020-06-18 15:20:01下载
    积分:1
  • 很强大的频率计,是仿真的 通过测试 非常的好
    很强大的频率计,是仿真的 通过测试 非常的好-Very powerful frequency counter, is to pass the test simulation is very good
    2022-03-10 23:20:59下载
    积分:1
  • 对游戏爱好者有一定帮助,让你了解游戏的技巧与美妙。对于VB也会有一定的帮助。...
    对游戏爱好者有一定帮助,让你了解游戏的技巧与美妙。对于VB也会有一定的帮助。-lovers of the game definitely helps you understand the game with wonderful skills. For VB will have some help.
    2022-04-11 23:51:16下载
    积分:1
  • Y_Browser_050_0_3rdEd is the best file browser for symbian 9.1
    Y_Browser_050_0_3rdEd is the best file browser for symbian 9.1-Y_Browser_050_0_3rdEd is the best file br owser for symbian 9.1
    2023-04-09 10:35:04下载
    积分:1
  • 燃气轮机性能监测诊断技术研究综述
    说明:  一篇讲解燃气轮机故障诊断的综述,分类很全面讲解很不错(An overview of gas turbine fault diagnosis, very comprehensive explanation of classification, very good)
    2019-12-03 15:40:37下载
    积分:1
  • 某个著名博士关于如何查找文献,和学术论文发表的ppt
    某个著名博士关于如何查找文献,和学术论文发表的ppt-a famous literature on how to identify and academic papers published ppt
    2022-10-24 02:00:04下载
    积分:1
  • 696518资源总数
  • 104662会员总数
  • 21今日下载