登录
首页 » Java » JAVA

JAVA

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

  • 基于LABVIEW平台的声卡的频谱分析仪,希望对大家有所帮助。
    基于LABVIEW平台的声卡的频谱分析仪,希望对大家有所帮助。-LABVIEW platform based on the audio spectrum analyzer, we want to help.
    2022-06-27 14:44:15下载
    积分:1
  • 电话PSTN线路上FSK处理软件
    电话PSTN线路上FSK处理软件-PSTN phone line on FSK processing software. . . . . . . . .
    2022-02-04 03:24:04下载
    积分:1
  • release management system (sps) v2.0
    发布管理系统(sps)v2.0-release management system (sps) v2.0
    2022-02-20 19:09:34下载
    积分:1
  • in the kongzhi xia can shixian shitou jiandao bu game
    用MFC实现把客户区分为两个部分,欢迎下载-in the kongzhi xia can shixian shitou jiandao bu game
    2022-04-30 06:09:04下载
    积分:1
  • power_HalfBridgeMMC
    说明:  模块化多电平换流器(modular multilevelconverter MMC)已成为柔性直流输电系统的首选换流器拓扑。我国已建成的上海南汇柔性直流工程、南澳三端柔性直流工程、舟山五端柔性直流输电工程以及正在建设中的厦门柔性直流工程都采用MMC结构。国际上SIEMENS已建成的美国跨湾工程(Trans Bay Cable Project TBC)和法国一西班牙联网工程(INELFE工程))都采用MMC结构。同时,ABB公司提出了一种级联两电平结构(cascaded two level CTL),其本质仍为MMC,并且ABB后续建设的数项柔性直流工程都采用CTL结构。因此,MMC已由最初的低压、小容量示范工程向高电压、大容量方向快速发展,展现出很好的发展前景。(Modular multilevel converter (MMC) was first proposed and patented by Professor R. Marquardt in 2001. It consists of several sub modules (SM) with the same structure. The sub module structure can be divided into three types: half H-bridge, full H-bridge and double clamp sub module. Modular multilevel converter (MMC) has shown a very important engineering application prospect.)
    2020-06-28 11:00:01下载
    积分:1
  • Profibus-v3.3
    说明:  Siemens S5 Hardware Configuration tools
    2020-06-25 16:00:02下载
    积分:1
  • GPS和INS联合导航matlab程序
    说明:  该程序为GNSS与IMU组合导航中常见的一种组合方案,(This program is a common combination scheme of GNSS and IMU)
    2020-08-23 14:08:17下载
    积分:1
  • jquery全屏图片滑动
    底部由CSS过渡效果的焦点按钮,焦点按钮可以直接点击滑动到相应(Focus button with CSS transition effect at the bottom. Focus button can be clicked and slid directly to the corresponding button.)
    2019-03-27 14:12:33下载
    积分:1
  • 18B20+LCD1602 msp430驱动lcd1602
    18B20+LCD1602 msp430驱动lcd1602-18B20+ LCD1602 msp430 driver lcd1602
    2023-06-18 04:45:03下载
    积分:1
  • TestCalculatorDemo
    这是自己编写的一个简易计算器,用于加减乘除计算,还有百分比和平方。(I have written a simple calculator for arithmetic calculations, as well as percentages and square.)
    2013-11-16 20:02:17下载
    积分:1
  • 696516资源总数
  • 106914会员总数
  • 0今日下载