登录
首页 » Java » Mypicture

Mypicture

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

  • SpinnerButtonDemo
    spinner的应用源码,非常酷炫,很好的资源(spinner application source code, very cool, very good resource)
    2014-02-05 19:53:23下载
    积分:1
  • njumobile
    电信运营支撑系统 Telecom operation support system(Telecom operation support system Telecom operation support system)
    2014-07-30 00:33:35下载
    积分:1
  • Databasesampletest
    JAVA实现模拟数据库,可以读取和保存文件(JAVA simulation database, can read and save the file)
    2007-05-04 13:45:12下载
    积分:1
  • Reflection
    JavaSE基础,Java 反射机制编程,是J2EE的基础部分之一,是一个难点。我亲自调试编译过的,绝对有用,如果觉得不错,请留言。谢谢! (Java Foundation,It is useful to New Learners!)
    2011-09-01 12:44:41下载
    积分:1
  • zhousan
    vc++连接数据库的有关代码,以及对话框的设计(vc++ connect to the database of the code, and the design of the dialog box)
    2010-06-24 21:31:16下载
    积分:1
  • ResumeManagement
    本系统基于jsp+servlet+javabean三层模式开发,为了使页面更加友好,系统使用javascript提供与用户交互的功能。 v1.0功能: 普通用户:注册,登陆,增删改简历,申请已有职位。 管理员:登陆,查看简历,处理简历,查询简历,发布职位。(The system is based on jsp+ Servlet+ Javabean three-tier model of development, in order to make the page more friendly, system uses javascript to provide user interaction functions. v1.0 features: the general user: Register, landing, additions and deletions to resume, apply for jobs there. Administrator: login, view resume, curriculum vitae deal with inquiries, resume, post release.)
    2008-05-20 16:48:57下载
    积分:1
  • 成绩管理系统源码
    成绩管理系统,对成绩管理,有成绩的录入,管理,分类等(achievement score result mark management system supervising system supervisory system manage supervise administrate Administration entering classify classification assortment)
    2018-05-30 16:41:04下载
    积分:1
  • C++实现排序代码
    说明:  这是一个基于C++语言的算法项目,能够实现简单排序(This is an algorithm project based on C + + language, which can realize simple sorting)
    2019-11-30 15:58:34下载
    积分:1
  • 学习案例-基于DB的运用MVC开发模式的登录
    说明:  学习案例-基于DB的运用MVC开发模式的登录程序 java源代码+数据库(Study case - login procedure based on DB using MVC development mode Java source code + Database)
    2020-02-29 12:35:30下载
    积分:1
  • 层次分析法
    说明:  层次分析法,简称AHP,是指将与决策总是有关的元素分解成目标、准则、方案等层次,在此基础之上进行定性和定量分析的决策方法。(It refers to the decision-making method that divides the elements that are always related to decision-making into objectives, criteria, schemes, etc. on the basis of which qualitative and quantitative analysis can be carried out)
    2020-06-25 12:40:02下载
    积分:1
  • 696516资源总数
  • 106914会员总数
  • 0今日下载