登录
首页 » Java » JAVA

JAVA

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

  • 03-2x2MIMO系统的完整数据链仿真
    说明:  % Type of different detectors, parameters for Detector.m ML = 1; % Joint ML Detector JMMSE = 2; % Joint MMSE Detector ZF = 3; % Joint Zero-Forcing Detector % Type of different antenna selection criteria methods MBER = 1; MMI = 2; LAZY = 3; MNP = 4; %Minimum Noise Power MMNP = 5; LAZY2 = 6; real_ch = 0; % real_ch = 0 refers to simulated channel in MATLAB, otherwise refers to real channel SNR_dB = 20;% transmit SNR in the simulated channel nr_frames = 20; % number of frames sent when simulation. detect_type = ZF; % Detector choice select_type = MBER; % Antenna selection choice disp(''); tx(nr_frames); disp('Press any key to continue'); pause RF(real_ch,SNR_dB); disp('Press any key to continue'); pause BER = rx(detect_type,select_type);
    2020-08-29 15:55:00下载
    积分:1
  • AutoProject
    用VC操作EXCEL的方法,生成了一个excel表格(EXCEL using VC operation method to generate a excel form)
    2008-07-15 13:49:17下载
    积分:1
  • 海德汉查看采集授权方法
    说明:  海德汉数控系统授权查看及操作方法,便于数据采集(Authorized view of heidenhan CNC system)
    2020-06-17 14:48:57下载
    积分:1
  • ESRI形状文件读/写的源代码。形状是一个主要的地理信息系统文件格式,第…
    ESRI SHAPE文件读/写源代码。SHAPE是GIS中的重要文件格式,本代码对于研究SHAPE文件格式,实现独立代码读/写SHAPE而言,将非常轻松。建议首先阅读SHAPE文件格式白皮书。-ESRI SHAPE document read/write source code. SHAPE is a major GIS file format, the code for research SHAPE file format, achieve independent code reading/writing SHAPE, will be very relaxed. SHAPE proposal was first read the White Paper document format.
    2022-01-25 23:10:02下载
    积分:1
  • 25811265dijkstra
    对三维环境进行路径规划()
    2018-05-09 09:32:33下载
    积分:1
  • adc-snr-测试代码大全
    逐次逼近型SAR模数转换器ADC的SNR测试大全(The SNR test code for SAR ADC)
    2017-06-21 17:09:10下载
    积分:1
  • Yang_et_al-2019-Navigation
    Introduction to BeiDou navigation satellite system
    2020-06-19 16:00:01下载
    积分:1
  • 为什么这个网站要弄这么麻烦啊??真是搞不明白,有好东西,就拿出来大家看看嘛。...
    为什么这个网站要弄这么麻烦啊??真是搞不明白,有好东西,就拿出来大家看看嘛。-why this site to get too much trouble ah? ? Really do not know, there are good things, we look at Take out ".
    2022-03-21 05:42:47下载
    积分:1
  • Oblique Nozzle
    该代码可以模拟特定尺寸超音速斜切喷管模拟,若修改其中尺寸参数,可以达到模拟任何超音速流动。(The code can simulate the supersonic oblique-cut nozzle with a specific size. If the size parameters are modified, any supersonic flow can be simulated.)
    2020-06-21 18:40:02下载
    积分:1
  • Sensor Control for irrigation and likwise projects
    Sensor Control for irrigation and likwise projects
    2022-03-26 03:44:26下载
    积分:1
  • 696522资源总数
  • 104047会员总数
  • 21今日下载