登录
首页 » Java » JAVA

JAVA

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

  • 计算刀轴点坐标
    计算刀轴点坐标,方便快捷,求取刀具刀轴点坐标,用于算nurbs曲线(Calculating the coordinates of cutter axis points is convenient and fast. Calculating the coordinates of cutter axis points is used to calculate NURBS curve.)
    2019-05-22 14:47:00下载
    积分:1
  • matlab求积分实例
    插值型求积方法 275   8.1.1 梯形公式 276   8.1.2 辛普森公式 277   8.1.3 柯特斯公式 278   8.2 复化求积公式 279   8.2.1 复化梯形公式 279   8.2.2 复化辛普森公式 281   8.2.3 复化柯特斯公式 283   8.2.4 复化求积公式误差分析 285   8.3 步长逐次减半求积方法 286   8.3.1 步长逐次减半梯形求积公式 287   8.3.2 步长逐次减半辛普森求积公式 288   8.3.3 步长逐次减半柯特斯求积公式 290   8.3.4 Romberg求积公式 291   8.4 自适应求积方法 293   8.5 Gauss求积方法 295   8.5.1 Gauss求积公式的构造 295   8.5.2 几种常用的Gauss求积公式 297   8.6 重积分的数值解 303   8.7 MATLAB自带函数应用 304   8.7.1 trapz函数 304   8.7.2 integral函数 305   8.7.3 integral2函数 307   8.7.4 integral3函数 307(Interpolation Method for Integral Program Code)
    2019-02-13 10:54:13下载
    积分:1
  • VVVMDDD
    说明:  变分模态分解的整体框架是变分问题,使得每个模态的估计带宽之和最小,其中假设每个“模态”是具有不同中心频率的有限带宽,为解决这一变分问题,采用了交替方向乘子法,不断更新各模态及其中心频率,逐步将各模态解调到相应的基频带,最终各个模态即相应的中心频率被一同提取出来(The whole framework of variational mode decomposition is variational problem, which makes the sum of the estimated bandwidth of each mode minimum. It is assumed that each "mode" is a finite bandwidth with different center frequencies. To solve this variational problem, the alternating direction multiplier method is used to update each mode and its center frequency continuously, demodulate each mode to the corresponding fundamental frequency band step by step, and finally each mode is called the first mode The corresponding center frequencies are extracted together)
    2021-03-12 09:25:54下载
    积分:1
  • 风速
    考虑恒风的质点外弹道计算,计算质点的外弹道,不是刚体的(Calculation of the exterior ballistics of a particle with constant wind)
    2020-07-04 13:20:02下载
    积分:1
  • 有限元计算程序(matlab)
    它将求解域看成是由许多称为有限元的小的互连子域组成,对每一单元假定一个合适的(较简单的)近似解,然后推导求解这个域总的满足条件(如结构的平衡条件),从而得到问题的解。(It regards the solution domain as consisting of many small interconnected subdomains called finite element elements, assumes a suitable (relatively simple) approximate solution for each element, and then deduces that the solution of this domain satisfies the conditions (such as the structural equilibrium condition), so as to obtain the solution of the problem.)
    2020-06-19 19:20:02下载
    积分:1
  • 两阶段三系统网络DEA
    能够计算出两阶段三系统的网络dea模型的第一阶段效率、第二阶段效率以及总体效率(The first stage efficiency, the second stage efficiency, and the overall efficiency of the two-stage three-system network DEA model can be calculated)
    2021-03-08 20:49:28下载
    积分:1
  • C# 创建泛型字典的例子
    C# 创建泛型字典,为泛型字典添加3个元素,按键值对泛型字典进行排序操作。   Dictionary users = new Dictionary();//创建泛型字典   users.Add(3, new UserInfo(1, "滕*敏", "01"));//为泛型字典添加3个元素   users.Add(2, new UserInfo(2, "滕*娜", "02"));   users.Add(1, new UserInfo(3, "X家兴", "03"));   //按键值对泛型字典进行排序操作   var query = from item in users    where item.Value.UserName.CompareTo("滕*") > 0//用户名大于"滕立"    orderby item.Key    select item;   label1.Text = "显示查询结果: ";   foreach (var item in query)//显示查询结果
    2022-08-02 11:59:24下载
    积分:1
  • CosmoWorldDoc
    三维建模软件CosmoWorld的教程,功能比较强大。(Three-dimensional modeling software tutorial CosmoWorld, more powerful features.)
    2008-03-20 11:09:14下载
    积分:1
  • cavity,上边界速度入口
    说明:  cavity,上边界速度入口,下边界压力出口,左右反弹(cavity .zou-he boundary condition .velocity inlet .pressure outlet)
    2020-05-09 22:33:05下载
    积分:1
  • 一个用vc编写的猜数字游戏,简单易用,与文曲新中的那个一样,只是这个是用vc写的罢了...
    一个用vc编写的猜数字游戏,简单易用,与文曲新中的那个一样,只是这个是用vc写的罢了-vc prepared with a viewing of the game, simple to use, with the venturi that the new, but it is just a write vc
    2022-01-28 21:17:32下载
    积分:1
  • 696516资源总数
  • 106914会员总数
  • 0今日下载