登录
首页 » Java » JAVA

JAVA

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

  • AdminLTE-2.3.11
    说明:  AdminLTE-2.3.11 后台管理页面(Background Management Page)
    2020-06-25 17:20:02下载
    积分:1
  • 命令模式-烤羊肉串03
    说明:  a c++ code developed by Chris H. Rycroft for 2D voronoi diagram generation
    2020-06-24 20:40:02下载
    积分:1
  • 这是在孩子们玩的C++初学者的经典游戏的比较…
    这是小时候的小孩玩过的比较经典的一款小游戏,适合c++初学者借鉴-This is when the kids played a comparison of the classic game for c++ beginners learn
    2022-05-20 16:14:40下载
    积分:1
  • Monte Carlo Method
    montecarlo算法,练习使用练习使用练习使用练习使用(montecarlo method montecarlo method)
    2018-09-18 20:10:18下载
    积分:1
  • dwa_code
    说明:  动态窗口法实现二维路径规划,可以设置圆形动/静态障碍物(Dynamic window method is used to realize two-dimensional path planning, and circular dynamic / static obstacles can be set)
    2021-02-24 18:09:39下载
    积分:1
  • 足球手机游戏,ea出品!fifa2007!超好玩的足球游戏!
    足球手机游戏,ea出品!fifa2007!超好玩的足球游戏!
    2022-03-07 02:42:30下载
    积分:1
  • Grid 控件应该分成自由式 报表和数据相关表格两种,内部实现机理不尽相同,你说的要求恰恰要把这两种风格的 报表融合起来:Exel 是典型的自由式报表...
    Grid 控件应该分成自由式 报表和数据相关表格两种,其内部实现机理不尽相同,你说的要求恰恰要把这两种风格的 报表融合起来:Exel 是典型的自由式报表,复制、拖拉、合并单元格等,它的每个单元格 都是相对独立的,数据相关表格就很不一样了,最典型的就是它有数据列的概念。 -Grid Control Report should be divided into freestyle and data related to table two, the internal mechanism of implementation is different, you said it to the requirements of these two styles together Report: Exel is a typical freestyle Report, copy, drag and drop, merger cells and so on, each of its cells are relatively independent, data related to very different on the table, the most typical is that it has the concept of data columns.
    2022-04-11 15:01:57下载
    积分:1
  • qppkv
    最小二乘回归分析算法,matlab开发工具箱中的支持向量机,小波包分析提取振动信号中的特征频率。( Least-squares regression analysis algorithm, matlab development toolbox support vector machine, Wavelet packet analysis to extract vibration signal characteristic frequency.)
    2017-04-23 22:51:22下载
    积分:1
  • 清新互联API
    能够使用清新互联的平台来对车辆GPS进行监视(Vehicle GPS can be monitored using a clean and interconnected platform)
    2020-06-17 03:20:01下载
    积分:1
  • aichongdu
    一个很老的病毒,欢迎大家学习下。有完整的源代码(A very old viruses, welcome you to learn under. Complete source code)
    2009-01-22 21:27:57下载
    积分:1
  • 696516资源总数
  • 106914会员总数
  • 0今日下载