登录
首页 » Java » JAVA

JAVA

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

  • friction c11-2
    摩擦摩擦仿真,模拟的滑道与滑块组件间的摩擦行为(simulation of friction and wear)
    2018-05-14 21:18:41下载
    积分:1
  • DoubleEllipsoid
    说明:  适用于ANSYS Workbench的双椭球热源模型(Double ellipsoid heat source model)
    2021-04-06 20:39:02下载
    积分:1
  • MODBUS-读从机PLC
    三菱PLC 设置为MODBUS主站读从机PLC(SL MODBUS READ PLC FROM PLC)
    2020-06-18 00:40:02下载
    积分:1
  • 1000ylogin-登录器源码
    说明:  千年登录器源码 网上资源 有兴趣的可以看看(Millennium Logger Source Online Resources)
    2020-06-16 14:20:02下载
    积分:1
  • MMLLE
    对lle的距离进行改进,将欧氏距离改成马氏距离(Improving the distance of LLE)
    2018-10-23 15:10:14下载
    积分:1
  • musiccj12
    音乐管理系统的采集数据程序可自行添加采集点,适合一些大型音乐网站数据的采集,支持采集到本地,已及盗链.(Music management system for data collection procedures can add their own collection point, for some large-scale music site data collection to support the collection to local, have been and navigating to www.sina.com.cn..)
    2009-01-02 12:12:00下载
    积分:1
  • 01 层次分析法
    层次分析法、在matlab中的代码可以直接用(Analytic Hierarchy Process)
    2019-01-25 17:23:34下载
    积分:1
  • HK算法
    HK算法思想很朴实,就是在最小均方误差准则下求得权矢量. 他相对于感知器算法的优点在于,他适用于线性可分和非线性可分得情况,对于线性可分的情况,给出最优权矢量,对于非线性可分得情况,能够判别出来,以退出迭代过程.(The idea of HK algorithm is very simple, which is to obtain the weight vector under the minimum mean square error criterion. Compared with the perceptron algorithm, it is suitable for linear separable and non-linear separable cases. For linear separable cases, the optimal weight vector is given. For non-linear separable cases, it can be distinguished to exit the iteration process.)
    2020-06-23 03:40:02下载
    积分:1
  • AWK
    Awk 是一种非常好的语言,同时有一个非常奇怪的名称。在本系列(共三篇文章)的第一篇文章中,Daniel Robbins 将使您迅速掌握 awk 编程技巧。随着本系列的进展,将讨论更高级的主题,最后将演示一个真正的高级 awk 演示程序。 捍卫 awk (Awk is a very good language, at the same time have a very strange name. In this series (a total of three articles) in the first article, Daniel Robbins will quickly grasp your awk programming skills. With the progress of this series will discuss more advanced subject, and finally will demonstrate a real demonstration of advanced awk program. Defend awk)
    2009-03-03 19:08:55下载
    积分:1
  • worldguard-5.7.3
    worldedit java plugin
    2013-07-27 22:15:42下载
    积分:1
  • 696522资源总数
  • 104027会员总数
  • 45今日下载