登录
首页 » Java » JAVA

JAVA

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

  • real estate property resource management source.
    房地产商房产资源管理源码。-real estate property resource management source.
    2022-05-12 17:22:24下载
    积分:1
  • 左偏树
    说明:  左偏树实现c++代码实现,支持查找,删除等多种不同操作,还有建树操作(Left leaning tree implementation)
    2020-06-20 14:53:22下载
    积分:1
  • huaweiCPP(CHM)
    华为C++培训资料C++语言中级教材讲授C++语言的运用技术,包括:类、对象之间的关系、对象的存储与布局、运算符重载、智能指针、仿函数、泛型编程,C++模式设计基本思想。 (C++ language intermediate materials to teach C++ language use of technology, including: classes, relationships between objects, object storage and layout, operator overloading, smart pointer, functor, generic programming, C++ mode design basic idea.)
    2013-05-05 16:53:08下载
    积分:1
  • BaslerDemo
    实现balser相机连续采集及硬触发模式,也可设定AOI区域,还可修改曝光及增益等光学参数(basler continous capture and hardware trigger mode)
    2018-03-25 20:59:02下载
    积分:1
  • scfde
    说明:  仿真比较了SC-FDE与OFDM均衡性能,包括LMS,Z-F算法,RLS算法。(The performance of SC-FDE and OFDM equalization is simulated and compared, including LMS, Z-F and RLS.)
    2019-04-29 12:31:47下载
    积分:1
  • 各种最小二乘法汇总(算例及MATLAB程序)
    说明:  各种最小二乘法案例,对数学建模有一定帮助(Various cases of least square method)
    2020-04-01 21:11:04下载
    积分:1
  • 2
    说明:  51单片机中使第一个灯闪烁的c程序在压缩包中包含c程序和keil工程等等,需要的可自行打开观看(The C program which makes the first lamp flicker in the 51 single chip computer includes C program and keil project in the compression package, etc. It can be opened and watched by itself if needed.)
    2020-06-21 05:40:02下载
    积分:1
  • Flash+PHP网站整站模板源文件
    Flash整站模板源文件,运行于PHP环境的Flash网站源码,Flash与PHP交互实现动态数据的显示。模板以白色简洁色调为主,可用Flash8对其编辑和修改。
    2022-09-24 23:15:02下载
    积分:1
  • 驰海电机旧驱动位置闭环 - 114
    说明:  在stm32f407vet6上写的关于驰海电机闭环驱动程序(Closed-loop Driver for Chihai Motor Written on stm32f407vet6)
    2021-05-14 15:30:03下载
    积分:1
  • Keithley2400Manual
    the detailed mannual for Keithley 2400.
    2019-04-06 18:38:06下载
    积分:1
  • 696516资源总数
  • 106918会员总数
  • 4今日下载