登录
首页 » Java » JAVA

JAVA

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

  • Quectel_MC60_Hardware_Design_V1.3
    Quectel_MC60_Hardware_Design New
    2017-12-12 11:34:30下载
    积分:1
  • MATLAB初学者 包好了一些用matlab解微分方程的源程序
    MATLAB初学者 包好了一些用matlab解微分方程的源程序-MATLAB beginner beginners MATLAB wrap some source code for solving differential equations using matlab
    2022-07-10 02:24:14下载
    积分:1
  • Solution1
    用vb.net做的大富翁,a Console Application that models the game of Monopoly.Houses • Hotels • Rolling doubles • Players will not be allowed to sell properties once purchased. • Players may mortgage a property but it will remain mortgaged for the rest of the game. • No one will ever go to jail.(vb.net do with the millionaires, a Console Application models that the game of Monopoly.Houses Hotels## 8226 8226 8226 Rolling doubles# Players will not be allowed to sell properties once purchased.# 8226 Players may mortgage a property but it will remain mortgaged for the rest of the game.# 8226 No one will ever go to jail.)
    2005-04-23 07:33:09下载
    积分:1
  • thesis
    2009nuaa南京航空航天大学毕业论文。《DTC直接转矩控制的实现》.内含simulink模型。可在matlab7.0以上直接运行。PS: 此模型为建立在数学模型基础之上,未使用power sysytem toolbox。(因toolbox版本不同会产生不兼容现象)(Thesis of Nanjing University of Aeronautics and Astronautics 2009 nuaa. “DTC direct torque control to achieve.” Simulink model.It can be run directly in matlab 7.0 or higher. PS: This model is built on the basis of mathematical models, not using power sysytem toolbox. (Toolbox versions will produce a result not compatible with the phenomenon))
    2011-02-08 06:34:28下载
    积分:1
  • 点击展开的Flash图片菜单源文件
    点击展开的Flash图片菜单源文件,刚显示的时候是多个条状在一起,鼠标点击后会展开相应菜单项,再点点击会恢复原貌,这款菜单还是相当大气的,用Flash8可以打开源文件。
    2022-01-31 23:51:54下载
    积分:1
  • 是一个赛车的游戏 有远代码 可以正常运行 希望和大家在一起 讨论 关注...
    是一个赛车的游戏 有远代码 可以正常运行 希望和大家在一起 讨论 关注-Is a racing game has much code can be the normal operation of the hopes and everyone together to discuss issues
    2022-05-29 10:38:00下载
    积分:1
  • untitled.rar
    仿真模型搭建。对超级电容不同控制策略的仿真。可以借鉴,对超级电容不同的变化控制方式。(Simulation model building.Simulation of different control strategies for supercapacitors.It can be used for reference to control the different transformation of supercapacitors)
    2018-10-24 10:30:55下载
    积分:1
  • VSC_HVDC
    本程序是基于Matlab Simulink平台搭建的电压源型高压直流输电系统,又称柔性直流输电系统。(This procedure is based on Matlab Simulink platform to build the voltage source HVDC transmission system, also known as flexible DC transmission system.)
    2021-04-14 14:58:55下载
    积分:1
  • AdaptiveFiltersJmin
    说明:  Jmin for adaptive filter
    2019-05-31 00:42:39下载
    积分:1
  • Print Print myPrint2 control myPrint2 control
    myPrint2 打印控件 myPrint2 打印控件-Print Print myPrint2 control myPrint2 control
    2022-04-23 01:08:27下载
    积分:1
  • 696518资源总数
  • 104269会员总数
  • 42今日下载