登录
首页 » Java » JAVA

JAVA

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

  • bidirectional error diffusion algorithm
    说明:  提供了一种计算全息算法——双向误差扩散算法(bidirectional error diffusion algorithm)(A bidirectional error diffusion algorithm which used to generate a phase-only computer generated hologram was provided)
    2021-04-07 11:19:01下载
    积分:1
  • RBF_NN_MIC
    说明:  飞机起落架减摆仿真及飞机起落架减摆控制仿真研究研发(Simulation of aircraft landing gear shimmy reduction)
    2019-11-20 20:49:45下载
    积分:1
  • mqtt_test
    mqtt 前端连接通讯含DEMO和测试功能(The front-end connection communication of mqtt includes DEMO and test functions)
    2019-01-17 10:08:44下载
    积分:1
  • 清洁能源(光伏、风能等)matlab微电网仿真
    说明:  基于光伏、风能和储能微电网系统中的matlab仿真程序,可供参考。(Matlab simulation program based on photovoltaic, wind and energy storage microgrid system can be used for reference.)
    2021-04-17 21:08:52下载
    积分:1
  • ERADistNataf_MATLAB
    说明:  可以实现在电力系统概率潮流计算中的nataf变换(Nataf transformation can be realized in the calculation of power system probabilistic power flow)
    2020-11-09 19:59:48下载
    积分:1
  • VC++数据库实例:考试管理系统源代码
    一个VC++ Access数据库实例:学生考试管理系统源代码,窗体设计风格较通用,程序功能也不是太复杂,只是简单的数据库操作,比如添加、查询、修改学生信息等,左侧有一个树形菜单是挺不错的,程序在VC++6.0环境下顺利编译,运行界面如截图所示。
    2022-04-08 08:28:03下载
    积分:1
  • lsb图片隐藏
    使用lsb算法在图片中隐藏图片信息,并提取出来。(LSB algorithm is used to hide image information in the image and extract it.)
    2019-05-21 15:51:24下载
    积分:1
  • tutorial-first-game
    说明:  cocos creator摘星星源码哈哈哈(star catcher hahahah)
    2020-06-24 10:20:02下载
    积分:1
  • Metal_artifact-master
    说明:  用于CT中,去除金属伪影可靠算法(matlab平台)(Reliable algorithm for removing metal artifacts in CT (matlab platform))
    2020-06-23 09:20:01下载
    积分:1
  • 这是谭豪强C语言书上的不分作业习题,是我自己做的,都能运行,有茱萸学习...
    这是谭豪强C语言书上的不分作业习题,是我自己做的,都能运行,有茱萸学习-This is the C-language book on the big or worksheets, yes I do, to run, learning Cantleye
    2022-04-19 05:47:35下载
    积分:1
  • 696518资源总数
  • 106174会员总数
  • 31今日下载