登录
首页 » Java » JAVA

JAVA

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

  • open file
    说明:  IDL ENVI二次开发下批量打开landsat TM文件(Batch Opening of Lansat TM Files under IDL ENVI Secondary Development)
    2019-05-10 14:18:56下载
    积分:1
  • 条形码识别matlab程序
    用matlab编写的条形码识别程序,有图像例子,有识别结果,包含校验,很实用。(Bar code recognition program written with matlab, there are image examples, recognition results, including verification, very practical.)
    2019-03-20 16:15:54下载
    积分:1
  • ewebeditor10.0
    ewebeditor10.0弄清楚如何设置ewebeditor的“相对路径” web访问http://localhost/xxx/view.asp 其中xxx可以是任何的目录,例如: 1、xxx=web--------->http://localhost/web/view.asp 2、xxx=pc/web--------->http://localhost/pc/web/view.asp 本地目录:在某目录xx下有如下结构, ┎─[.] ┠─────view.asp ┃ ┠────┰[ewebeditor] ┃    ┃ ┃    ┖─ewebeditor.asp ┃ ┠────┰[admin] ┃    ┃ ┃    ┖─edit.asp ┃ ┠─────[uploadfile] 目录下有显示文件view.asp、编辑目录ewebeditor、管理目录admin、存放图片的目录uploadfile admin目录下有管理的edit.asp,用于编辑要显示的内容。(EB accesses http://localhost/xxx/view.asp Where XXX can be any directory, for example: 1. XXX = Web - ---> http://localhost/web/view.asp 2. XXX = PC / Web - ---- - > http://localhost/pc/web/view.asp Local directory: In a directory xx, there is the following structure.)
    2020-06-20 05:20:02下载
    积分:1
  • tomcat 最新版本6.0.13 ,从Apache官方网站上当的
    tomcat 最新版本6.0.13 ,从Apache官方网站上当的-tomcat the latest version 6.0.13, taken from the official website of Apache
    2022-11-16 17:05:04下载
    积分:1
  • 最近在关注gui,这是在网上找到的基于matlab gui的扫雷游戏源码,适合入门级试验学习。...
    最近在关注gui,这是在网上找到的基于matlab gui的扫雷游戏源码,适合入门级试验学习。-Recent concern about the gui, this is the Internet to find matlab gui-based source of mine game, suitable for entry-level pilot study.
    2022-03-30 00:33:42下载
    积分:1
  • 这是我在作研究是所使用的分词系统软件,现在提交给大家,供大家研究使用....
    这是我在作研究是所使用的分词系统软件,现在提交给大家,供大家研究使用.-This is my research is the use of segmentation system software, we now introduce to you, for your study.
    2023-02-05 12:20:04下载
    积分:1
  • 使用matlab调用refprop函数
    使用matlab调用refprop函数,包含三个.m文件(Calling RefProp function using MATLAB)
    2020-07-16 16:38:49下载
    积分:1
  • 在工程中引用 Microsoft Scripting Runtime 就可以了!具体看代码! 可以使用任何vbs脚本的功能!注意是使用vbs脚本的语法,和v...
    在工程中引用 Microsoft Scripting Runtime 就可以了!具体看代码! 可以使用任何vbs脚本的功能!注意是使用vbs脚本的语法,和vb6稍有不同!-In the works cited in Microsoft Scripting Runtime can be had! Specific code look! Can use any vbs script function! Attention is to use the vbs script grammar, and VB6 is slightly different!
    2022-01-23 11:16:43下载
    积分:1
  • Lyapunov
    说明:  计算L指数的算法,是根据L指数工具箱简化的算法,我用过,结果比较准确!(The program is based on Lyapunov toolbox,and I have used it .The results show that it is a good methord!)
    2009-08-02 15:46:07下载
    积分:1
  • DirectSound
    利用DirectSound+MFC开发的录音程序演示。(directsound record program)
    2018-11-23 11:38:47下载
    积分:1
  • 696518资源总数
  • 105873会员总数
  • 12今日下载