登录
首页 » Java » JAVA

JAVA

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

  • IOT-System-for-Car-master
    说明:  iNTERNET OF THINGS BASED
    2020-06-06 16:40:15下载
    积分:1
  • Delphi类名查询程序
    Delphi类名查询程序,本查询程序可自动获得光标处类名、窗口句柄、窗口标题等信息,并具有鼠标取词的功能,鼠标放在那不动,可自动获取对应的字符,本程序用来查询Delphi中的各个类名称也很方便。
    2023-05-07 09:55:02下载
    积分:1
  • Given more than ten kinds of relevant OFDM channel estimation methods MATLAB cla...
    给出了十余种有关OFDM信道估计方法的MATLAB经典程序-Given more than ten kinds of relevant OFDM channel estimation methods MATLAB classical procedures
    2023-01-15 12:15:04下载
    积分:1
  • SOM算法写的java
    用Java写的SOM,采用eclipse开发环境-SOM algorithm writing in Java
    2023-04-27 10:40:03下载
    积分:1
  • leetcode-cpp
    说明:  LeetCode Problem Solving: It is suitable for beginners who are looking for jobs, brushing questions and preparing for ACM algorithm competition.
    2019-02-18 19:43:31下载
    积分:1
  • NvmExpressDxe_4
    说明:  nvmexpressdxe4 broooooo
    2020-06-25 12:05:49下载
    积分:1
  • analysis MatLab
    说明:  图像融合指标的代码,有MI,Qabf,Nabf等(Code of Image Fusion metrics)
    2021-02-10 14:29:52下载
    积分:1
  • TesterAutomation-Dashboard-master
    说明:  LCR测试70 多年来,泰克旗下的吉时利公司一直致力于设计、制造和销售先进的电气测试仪器和系统,以满足电子制造商在高性能生产测试、过程监控、产品研发方面的特殊需求。(LCR meter measureKeithley Products and Application Insights Help Engineers Innovate. For more than 70 years, Keithley, a Tektronix company, has been designing, manufacturing and marketing advanced electrical test instruments and systems for the specialized needs of electronics manufacturers in high performance production testing, process monitoring, product development and research.)
    2020-07-10 16:15:49下载
    积分:1
  • 读取micaps
    说明:  该程序可通过matlab gui界面读取气象micaps数据(this code is used to read micaps data)
    2020-05-21 16:02:35下载
    积分:1
  • Visa 写入和读取
    说明:  Labview VISA读取和发送的例程,介绍了如何利用VISA读取和发送数据给串口(Labview VISA read and write samples)
    2021-01-10 09:32:46下载
    积分:1
  • 696516资源总数
  • 106914会员总数
  • 0今日下载