登录
首页 » Java » Mypicture

Mypicture

于 2021-04-14 发布 文件大小:13KB
0 233
下载积分: 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 个回复

  • JAVA 网页控件 v
    JAVA 网页控件 v-create-JAVA web controls v-create
    2022-02-02 12:41:48下载
    积分:1
  • MeshLodGenerator
    说明:  将mesh几何数据根据所选的Lod级数构建多层次几何数据(The mesh geometry data is constructed according to the Lod series selected)
    2020-07-20 15:53:30下载
    积分:1
  • VB 股票分析序源代码
    VB 股票分析程序源代码 图形界面分析数据源代码(VB stock analysis program source code)
    2020-07-02 23:40:01下载
    积分:1
  • CNN_test
    说明:  卷积神经网络代码的学习,运用mnist数据集(Convolutional neural network code learning)
    2021-04-12 13:29:54下载
    积分:1
  • Code_Examples
    说明:  本资源提供了《大话Java——从零基础到数据库、Web开发》 书籍中的源代码,即书中范例部分的代码。希望对你们有用。(The resources of the &quot talking big Java- from zero to a database-based, Web development&quot books, the source code, that is part of the book example code. Hope that useful.)
    2010-03-26 20:17:37下载
    积分:1
  • DataCollectionSystem
    徕卡TCA1800自动监测系统,可以应用于各种变形监测,用于数据的自动采集、保存以及平差处理,代码完整。(Leica TCA1800 automatic monitoring system that can be applied to a variety of deformation monitoring for automatic data collection, preservation, and adjustment processing, code integrity.)
    2021-02-01 14:00:00下载
    积分:1
  • DLL_use
    介绍如何在DLL中进行函数的定义,如何使用外部程序调用DLL中定义的函数。(how the DLL function for the definition, the use of external program called defined in the DLL function.)
    2007-06-21 21:39:47下载
    积分:1
  • text-data-mining
    说明:  此程序实现了如何在TXT或WORD文档中进行数据挖掘,在文本中提取有用信息(The realization of this procedure how to TXT or WORD document to carry out data mining, in the text to extract useful information)
    2008-10-09 09:43:14下载
    积分:1
  • Android记事本调试好的
    说明:  实现添加日志功能,用户能够保存自己怕忘记的事(Implementing the function of adding logs, users can save things they are afraid of forgetting.)
    2020-06-21 08:40:02下载
    积分:1
  • 通过本序,我们可以访问局域网内的其他计算机的文件资源。通过学习,应学会如何使用CSocket类来对制定端口进行扫描。...
    通过本程序,我们可以访问局域网内的其他计算机的文件资源。通过学习,应学会如何使用CSocket类来对制定端口进行扫描。-Through this process, we can access other computers on the LAN of file resources. Through the study, should learn how to use the CSocket class to the development of port scan.
    2022-03-19 19:36:32下载
    积分:1
  • 696518资源总数
  • 105549会员总数
  • 12今日下载