登录
首页 » Java » JAVA

JAVA

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

  • Superpostion
    Superposition Coding for broadchannels
    2019-06-19 01:11:11下载
    积分:1
  • A game of snake.
    snake,这是一个我们经常玩的蛇吞食的游戏。功能已经实现。大家可根据应用环境的不同进行移植。-A game of snake.
    2022-05-23 22:02:56下载
    积分:1
  • ADO
    ADO-Tool.1.5.2.LV711 与数据库链接的工具-ADO-Tool.1.5.2.LV711 tools and database links
    2022-02-04 09:49:42下载
    积分:1
  • Accelerator
    accelerator indicator
    2019-04-12 00:40:45下载
    积分:1
  • 经典的坦克大战游戏,单人或双人同机操作,游戏画面精致,并提供地图编辑器,可以自定义地图替换map文件夹中的过关地图,是不可多得的娱乐和学习材料。开发工具:VC+...
    经典的坦克大战游戏,单人或双人同机操作,游戏画面精致,并提供地图编辑器,可以自定义地图替换map文件夹中的过关地图,是不可多得的娱乐和学习材料。开发工具:VC++6.0 和 Directx ,地图编辑器是VB6。-classic casual games, single- or two-person operation with the machine, games exquisite picture, and provides a map editor, can customize maps replacement map folder clearance maps, is a rare entertainment and learning materials. Development tools : VC 6.0 and DirectX Map Editor is VB6.
    2022-02-09 16:10:57下载
    积分:1
  • CMA_DDLMS
    说明:  水声通信系统中,常数模盲均衡算法仿真的matlab实现(Matlab implementation of constant modulus blind equalization algorithm simulation)
    2021-04-15 10:18:54下载
    积分:1
  • JQuery
    说明:  Jquery 完整教程。供大家参考!!!(teach full Jquery book)
    2020-06-25 03:20:01下载
    积分:1
  • vb Loans have written before选号re
    vb 自己编写双色球,先选号再抽奖,试试自己的运气-vb Loans have written before选号re-draw, try their luck
    2022-08-03 09:45:26下载
    积分:1
  • 微厦网校运营系统 v1.0
    微厦网校运营系统是一款基于B/S架构的在线学习系统,支持手机端、电脑端,可以在安卓、苹果、微信中使用,方便学员利用碎片化时间进行随时随地的学习,可广泛用于培训机构、职业学院、机关单位、企业机构等等。该系统集在线学习、在线练习、模拟考试、在线考试于一体,这对于培训机构的远程教学开展更加有利。(Micro Xiamen campus operations system is a B/S structure of the online learning system based on mobile phone terminal, computer terminal, support, can be used in Android, apple, WeChat, convenient students use fragmentation time for learning can be widely used whenever and wherever possible, training institutions, Career Academy, institutions, organizations and so on.)
    2017-08-04 15:19:40下载
    积分:1
  • Sim_EKB_Install_2016_07_16
    西门子注册软件Sim_EKB_Install_2016_07_16(siemens Sim_EKB_Install_2016_07_16)
    2020-06-15 22:30:01下载
    积分:1
  • 696516资源总数
  • 106914会员总数
  • 0今日下载