登录
首页 » Java » JAVA

JAVA

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

  • A screen video software, the software can be used to process computer video
    一个屏幕录像软件,用该软件可以对电脑操作过程录像-A screen video software, the software can be used to process computer video
    2022-02-03 14:20:44下载
    积分:1
  • proxys
    说明:  pest testig aster pasta
    2019-02-10 03:59:41下载
    积分:1
  • 多重分形去趋势波动分析方法 MFDFA
    说明:  MF-DFA,Kantelhardt et al.(2002)提出的多重分形去趋势波动分析方法(MF-DFA, multifractal detrend fluctuation analysis)
    2020-02-18 13:50:53下载
    积分:1
  • python二级复习策略
    Python是一种计算机程序设计语言。是一种面向对象的动态类型语言,最初被设计用于编写自动化脚本(shell),随着版本的不断更新和语言新功能的添加,越来越多被用于独立的、大型项目的开发。(Python is a computer programming language. As an object-oriented dynamic typed language, it was originally designed to write automated scripts (shells). With the updating of versions and the addition of new language functions, it is increasingly used in the development of independent, large-scale projects.)
    2020-06-25 05:40:02下载
    积分:1
  • 电子秤程序
    能实现0.1g的重量测量,并可设置单价,计算总价(It can realize the weight measurement of 0.1g and set the unit price to calculate the total price.)
    2018-04-27 20:18:34下载
    积分:1
  • rdlc.report.engine
    说明:  这是一个开源的rdlc报表引擎,包含rdlc报表设计器等资源。(This is an open source RDLC report engine, including RDLC report designer and other resources.)
    2019-01-23 16:49:43下载
    积分:1
  • OPTO22 (1)
    说明:  e suna archivo para que me djen descarar alv
    2019-05-31 01:55:18下载
    积分:1
  • VORTEX
    说明:  利用对数极坐标到直角坐标系的变换实现不同拓扑荷数涡旋光束的并行检测,可用于光通信,以及对涡旋光性质的理解。整个仿真基于PRL文章“Efficient Sorting of Orbital Angular Momentum States of Light”(The parallel detection of vortex beams with different topological charges is realized by using the transformation from log polar coordinate to Cartesian coordinates, which can be used in optical communication and the understanding of vortex optical properties.The whole simulation is based on the article "efficient sorting of intrinsic angular momentum states of light" in PRL)
    2020-11-18 16:39:40下载
    积分:1
  • 低通滤波器(matlab)
    低通滤波,基于切比雪夫滤波器,可根据滤波要求调整截止频率(Low pass filter, based on Chebyshev filter, the cut-off frequency can be adjusted according to the filter requirements)
    2020-08-14 15:28:27下载
    积分:1
  • dianyun
    说明:  本问详细的说明了空间点云的重建三角网格 多种子点和平坦部分优先生长方法的点云到网格重建(Detailed description of the Q space point cloud reconstruction of triangular mesh multi-point and the flat part of the seed growth method priority point cloud to mesh reconstruction)
    2008-11-06 16:04:56下载
    积分:1
  • 696516资源总数
  • 106914会员总数
  • 0今日下载