CDN加速镜像 | 设为首页 | 加入收藏夹
当前位置: 首页 资源下载 WEB源码 JSP源码/Java

文件名称:ShapeExp1

  • 所属分类:
  • 标签属性:
  • 上传时间:
    2012-11-16
  • 文件大小:
    1.43kb
  • 已下载:
    0次
  • 提 供 者:
  • 相关连接:
  • 下载说明:
    别用迅雷下载,失败请重下,重下不扣分!
电信下载 联通下载
别用迅雷、360浏览器下载。
如迅雷强制弹出,可右键点击选“另存为”。
失败请重下,重下不扣分。

介绍说明--下载内容来自于网络,使用问题请自行百度

个人原创代码:矩形、圆形、正方形等形状的操作。编写Java Application程序,定义抽象类Shape,抽象方法为showArea(),求出面积并显示,定义矩形类Rectangle,正方形类Square,圆类 Circle,根据各自的属性,用showArea方法求出各自的面积,在main方法中构造3个对象,调用showArea方法。

定义接口DiagArea,其中包含方法double getDiagonal()求对角线长, double getArea()求面积,定义一个矩形类,实现此接口,并自行扩充成员变量和方法,定义一个正方形类继承矩形类(如矩形有长w和宽h,正方形有边x,并有相应的构造函数,有一个方法中一次直接显示边长、面积和对角线长),在另一类中的主方法里使用测试该类。-Personal original code: the operation of the rectangles, circles, squares and other shapes.Write java application procedures, the definition of abstract class Shape, abstract methods showArea (), calculate the area and define the rectangle class Rectangle, Square class Square, round class of the Circle, according to their respective properties, find the respective area showArea method,in the main method to construct three objects, to call showArea method.

Defined interface DiagArea, which contains the method of a double getDiagonal () Find the diagonal, double the getArea () find the area to define a rectangle class implements this interface, and to expand their own member variables and methods, define the class inheritance of a square rectangle (such as length w and width h, rectangle, square edge of the x, and corresponding constructor, a method is a direct display side length, area and diagonal length), the other in the main method to test the classes.
(系统自动生成,下载前可以参看下载内容)

下载文件列表

ShapeExp1.java
本Java程序设计详细要求.txt

相关说明

  • 本站资源为会员上传分享交流与学习,如有侵犯您的权益,请联系我们删除.
  • 搜珍网是交换下载平台,只提供交流渠道,下载内容来自于网络,除下载问题外,其它问题请自行百度。更多...
  • 本站已设置防盗链,请勿用迅雷、QQ旋风等下载软件下载资源,下载后用WinRAR最新版进行解压.
  • 如果您发现内容无法下载,请稍后再次尝试;或换浏览器;或者到消费记录里找到下载记录反馈给我们.
  • 下载后发现下载的内容跟说明不相乎,请到消费记录里找到下载记录反馈给我们,经确认后退回积分.
  • 如下载前有疑问,可以通过点击"提供者"的名字,查看对方的联系方式,联系对方咨询.

相关评论

暂无评论内容.

发表评论

*快速评论: 推荐 一般 有密码 和说明不符 不是源码或资料 文件不全 不能解压 纯粹是垃圾
*内  容:
*验 证 码:
搜珍网 www.dssz.com