登录
首页 » Java » Mypicture

Mypicture

于 2021-04-14 发布 文件大小:13KB
0 269
下载积分: 1 下载次数: 1

代码说明:

  定义4个类,MyShape、MyLine、MyRectangle和MyOval,其中MyShape是其他三个类的父类。MyShape为抽象类,包括图形位置的四个坐标;一个无参的构造方法,将所有的坐标设置为0;一个带参的构造函数,将所有的坐标设置为相应值;每个坐标的设置和读取方法;abstract void draw(Graphics g)方法。MyLine类负责画直线,实现父类的draw方法;MyRectangle负责画矩形,实现父类的draw方法;MyOval负责画椭圆,实现父类的draw方法。编写一个应用程序,使用上面定义的类,随机选取位置和形状,绘制20个图形。(Defines four classes, MyShape, MyLine, MyRectangle and MyOval, which MyShape the other three parent class. MyShape is an abstract class, including graphics position four coordinates a no-argument constructor, all the coordinates are set to 0 a parameterized constructor, all the coordinates is set to the corresponding values each coordinate set and reading method abstract void draw (Graphics g) method. MyLine class is responsible for drawing straight lines, to achieve the draw method of the parent class MyRectangle responsible for drawing rectangles, to achieve the parent class draw method MyOval responsible painted oval, draw method to achieve the parent class. Write an application that uses the class defined above, randomly selected location and shape, draw 20 graphics.)

下载说明:请别用迅雷下载,失败请重下,重下不扣分!

发表评论

0 个回复

  • 综合成本(火电机组与光热)
    说明:  光热电站和火电机组的优化调度,可用于光热电站的学习(Optimal operation of photothermal power station and thermal power unit)
    2020-03-05 14:28:32下载
    积分:1
  • khttpd-2
    说明:  Kernel Mode HTTP Server
    2019-12-23 20:44:03下载
    积分:1
  • 虚拟银行的解决方案。外国银行提供学生贷款。为重点。
    本解决方案虚拟了一个银行。这个银行对外提供助学贷款。由于这个银行有很多外部营助学贷款管理系统.rar 业网点,及时统计、查询这些助学贷款信息,就是对本解决方案的要求。-the solution of a virtual bank. The foreign banks to provide student loans. As the banks have a lot of external business management system of student loans. Rar industry networks and timely statistics, these inquiries student loans message that the solution to the request.
    2023-01-28 12:45:05下载
    积分:1
  • Windowschengxuyunxingyuanli
    windows 程序运行原理。说得到很好啊,对你觉对有用1(windows procedures principle. Ah said to be good for you a useful right McGREGOR)
    2007-04-11 19:36:00下载
    积分:1
  • ScreenOrientationQualifierTest
    Screen Orientation Qualifier Test for Andriod.
    2014-03-19 09:24:30下载
    积分:1
  • 探测哪些端口被使用,现在连接的目标地址,
    探测哪些端口被使用,现在连接的目标地址,-Detect which ports are used, and now connected to the target address,
    2022-10-22 01:55:05下载
    积分:1
  • deep-in-C-lanuage
    很有深度的C语言书籍,对有一定基础的读者有较大帮助(Very deep C-language books, on a basis of great help readers)
    2013-09-23 11:50:51下载
    积分:1
  • mVasm
    说明:  实现加法在计算机系统中,为了提高主存利用率,往往把辅助存储器(如磁盘)作为主存储器的扩充,使多道运行的作业的全部逻辑地址空间总和可以超出主存的绝对地址空间。(achieve additive in the computer system, in order to increase the utilization rate of survival, often auxiliary memory (such as disk) as a main memory expansion. Multi-channel operation so that the operations of all logical address space can exceed the sum of the absolute main memory address space.)
    2007-06-02 00:00:22下载
    积分:1
  • Software-Design-and-Evaluation
    面向服务的织女星网格系统软件设计与评测,网格是开放的分布式系统, 具有自治、动态和可扩展特性. 在I nter net 环境下实现网格系统必须解决大规模资源共享与协同问题(Service Oriented VEGA Grid System Software Design and Evaluation,Grid is open and distributed system, which has characters of scalability, dynamic and autonomy)
    2014-07-03 23:27:40下载
    积分:1
  • anuprinciple
    介绍了10种滤波器的原理及其软件实现过程,(The principle and software realization of 10 kinds of filters are introduced.)
    2019-03-27 14:07:27下载
    积分:1
  • 696518资源总数
  • 106161会员总数
  • 5今日下载