登录
首页 » Java » JAVA

JAVA

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

  • 有源滤波器主控芯片源代码
    有源滤波器主控芯片6713源代码,里面检测系统电压电流 计算出需要补偿的无功以及谐波 控制IIGBT驱动信号  输出电流信号完成有源滤波器的功能
    2022-07-26 18:22:55下载
    积分:1
  • 经典平差
    说明:  处理水准网经典平差的有关问题,输出平差报告和各高程点的精度文件,判断平差结果的精度(Deal with the relevant problems of leveling network adjustment, output the adjustment report and the accuracy documents of each elevation point, and judge the accuracy of the adjustment results)
    2020-05-19 12:31:10下载
    积分:1
  • 电力104规约Demo版 C++版本,供大家参考
    电力104规约Demo版 C++版本,供大家参考-104规约Demo版C
    2022-02-03 19:19:45下载
    积分:1
  • code
    说明:  UMAT abaqus 自定义晶体取向 晶体塑性 代表提及元 有限元模拟(Finite element simulation of plastic representative mention element of self defined crystal orientation crystal)
    2020-06-24 07:29:02下载
    积分:1
  • Tickstory历史数据
    用于MT4 EA回测 复盘质量可以达到99.99% 不错的工具(For the MT4 EA test can reach 99.99% good quality checking tools)
    2020-07-01 00:00:02下载
    积分:1
  • 03.二维码生成
    说明:  基于微信小程序开发的二维码生成软件,用户可以自定义二维码内容(The QR code generation software developed based on wechat applet allows users to customize the QR code content)
    2020-06-17 12:40:01下载
    积分:1
  • LCD OSD procedures for the development of LCD 8051
    LCD-OSD程序,用于8051液晶显示器的开发
    2022-10-07 13:25:03下载
    积分:1
  • EN25T16_20210109_171603 TRAIL 1
    说明:  sc6138a SOC INBUIT MP3 DECODER AND SPDIF INPUT AND I2S OUTPUT FRIMWARE DUMP
    2021-01-14 14:49:41下载
    积分:1
  • 网吧管理系统Delphi源码版
    网吧管理系统Delphi源码版,在系统dsn里的名字为网吧管理系统,作者:杨安.数据库基于Access.进行刷卡上机管理,运用网络和系统接口等技术来实现.
    2023-04-10 23:05:04下载
    积分:1
  • 飞机大战
    小游戏小项目练手源码,图片素材,适合练手。。。(Small game small project training source code, picture material, suitable for hand training....)
    2020-06-25 11:20:01下载
    积分:1
  • 696516资源总数
  • 106914会员总数
  • 0今日下载