登录
首页 » Java » JAVA

JAVA

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

  • LLE
    说明:  数据降维处理算法,流形学习方法。一般用在脸数据集。数据降维处理算法,流形学习方法。一般用在脸数据集。(Data dimension reduction processing algorithm,manifold learning method.Generally used in face data sets.)
    2020-09-30 21:30:10下载
    积分:1
  • 功能简介: 多用户管理分权限发布、管理软件信息; 自由选择系统默认为静态HTML或动态ASP; 无限制添加下载服务器,添加软件只需要填写软件名称; 新增广告管理
    功能简介: 多用户管理分权限发布、管理软件信息; 自由选择系统默认为静态HTML或动态ASP; 无限制添加下载服务器,添加软件只需要填写软件名称; 新增广告管理功能和FLASH投票系统; HTML编辑器为可选项; 支持N级软件分类、无限制添加软件下载链接。 软件信息、文章内容批量删除、批量分类转移等批量管理功能; 完善而方便的软件信息添加、编辑表单,无组件图片上传; 文章添加,连接等HTML效果或者全部支持HTML; 软件及文章编辑修改,内附搜索程序; 本站资源的统计功能; 在线人数统计功能,并显示在线用户的详细信息; 强大的会员下载功能自由设置会员组级别; 模板及样式在线管理,可以在后台直接添加/修改样式; 强大的数据库处理功能,备份、压缩、恢复、数剧库在线更名; 自由添加友情连接,自由添加删除网站栏目; 免费版本不提供生成静态页面功能 后台默认用户名:admin 密码:admin -profiles : multi-user management authority released information management software; Free choice of system defaults to static or dynamic HTML ASP; Add unlimited download server, add the software is only required to complete the software name; The new advertising management capabilities and FLASH voting system; HTML editors for options ; software support N classification, unrestricted add software download links. Software information, delete the article content volume, volume classification transfer volume management functions; Perfect and convenient software information to add, edit forms, uplo
    2022-03-24 18:59:08下载
    积分:1
  • 盗号流程附163扫号器(1)
    360运行报毒,关闭360后打开,可查询steam密正,163邮箱扫号改密自动完成,(steam support justice)
    2020-06-29 03:20:01下载
    积分:1
  • 【20】基于阈值分割的车牌定位识别
    说明:  matlab车牌照简单识别,带有gui界面(License plate recognition GUI interface)
    2020-12-22 12:15:29下载
    积分:1
  • Insert_czm_to_abaqus_input-master
    说明:  abaqus 插件用于插入内聚力单元,用于裂纹扩展模拟(Insert cohesive unit in abaqus)
    2021-04-05 15:49:03下载
    积分:1
  • [安卓开源]Myfood订餐
    安卓点餐app,非常有参考价值,大家可以接见一下(Android ordering app, very valuable reference, you can see)
    2020-06-30 09:20:02下载
    积分:1
  • source
    《Visual C++游戏开发经典案例详解》书中的源代码,希望对大家有一些帮助!(" Visual C++ game development classic cases." book of the source code, we hope to have some help! )
    2011-12-27 10:34:45下载
    积分:1
  • this a test program
    this a test program-this is a test program.........
    2022-02-10 16:48:13下载
    积分:1
  • five-code
    1.声卡发生:促使声卡发声音 2.控件自定义摆放:可左右移动选择控件并摆放位置 3.相对路径图片显示:拾取当前文件的路径名,而后使用连接路劲函数连接图片名称,之后将完整的图片路劲输入显示。 4.声源定位:通过采集声信号判定位置 5.鼠标拖动拉伸控件(A sound card occurred: the sound card issued sound Controls placed custom: can move the selected control and placement 3 relative path picture: pick up the current file s path name, then use the strength function of the link road to connect the image name, and will be followed by the complete picture of fresh input display. (4) Sound Source Localization: by collecting acoustic signals to determine position Mouse to drag the stretch control)
    2012-03-13 17:14:15下载
    积分:1
  • EPSON 打印机的列表功能 C 语言源代码
    EPSON 打印机的列表功能 C 语言源代码-EPSON printer features a list of C language source code
    2023-03-20 18:45:03下载
    积分:1
  • 696516资源总数
  • 106914会员总数
  • 0今日下载