登录
首页 » Java » Mypicture

Mypicture

于 2021-04-14 发布 文件大小:13KB
0 177
下载积分: 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.)

文件列表:

Mypicture
.........\.classpath,301,2012-10-02
.........\.project,385,2012-10-02
.........\bin
.........\...\DrawComponent.class,1507,2012-10-12
.........\...\MyJframe.class,661,2012-10-12
.........\...\MyLine.class,710,2012-10-12
.........\...\MyOval.class,716,2012-10-12
.........\...\Mypicture$1.class,648,2012-10-12
.........\...\Mypicture.class,512,2012-10-12
.........\...\MyRectangle.class,730,2012-10-12
.........\...\MyShape.class,1266,2012-10-12
.........\src
.........\...\DrawComponent.class,1009,2013-11-03
.........\...\MyJframe.class,562,2013-11-03
.........\...\MyLine.class,537,2013-11-03
.........\...\MyOval.class,543,2013-11-03
.........\...\Mypicture$1.class,536,2013-11-03
.........\...\Mypicture.class,408,2013-11-03
.........\...\Mypicture.java,3976,2012-10-03
.........\...\MyRectangle.class,552,2013-11-03
.........\...\MyShape.class,946,2013-11-03

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

发表评论


0 个回复

  • TransactionService
    Transaction Service extends Service implements Observer Source Code for Andriod.
    2013-12-19 11:14:26下载
    积分:1
  • xmlc
    XML文件读写程序(XML document literacy procedures)
    2005-01-02 23:42:27下载
    积分:1
  • JAVA
    MakeBar.dll二维条码生成动态连接库,用以生成PDF417二维条码,适用于windows环境开发工具。(This application not only demonstrates the basics of using the Microsoft Foundation classes but is also a starting point for writing your application. )
    2013-01-03 14:53:56下载
    积分:1
  • Exp_Tab
    可以实现安卓中TabHost选项卡的功能,并且用意图进行跳转(Can realize the function of the TabHost TAB in the android, and with intention to jump)
    2013-12-19 11:24:05下载
    积分:1
  • Java
    设计模式一(单子、工厂、策略模式)练习 1. 假设现在要设计一个贩卖各类书籍的电子商务网站的购物车系统。对所有的教材类图书 实行每本一元的折扣;对连环画类图书提供每本7%的促销折扣;而对非教材类的计算机图书有3%的折扣;对其余书没有折扣。使用策略模式、工厂模式、单子模式进行设计(Design Mode 1 (List, Factory, Strategy Mode) Exercise 1. Suppose we are going to design a shopping cart system for e-commerce websites that sell all kinds of books. All textbook books are discounted at one yuan per book; comic books are discounted at 7% per book; computer books are discounted at 3% for non-textbook books; and other books are discounted at no rate. Design using strategy mode, factory mode and single mode)
    2020-07-01 06:40:02下载
    积分:1
  • Matrix-substruction
    matrix substraction in rmi java
    2011-05-24 07:01:20下载
    积分:1
  • java作业
    初学java的可以借鉴,学java的可以借鉴学java的可以借鉴(Lessons for beginners of Java)
    2020-06-17 20:40:04下载
    积分:1
  • menubar-1.0.20-src
    说明:  使用j2me实现二级菜单,有利于页面的扩展,有利于开发(Use j2me to achieve the secondary menu is conducive to the expansion of the page and is conducive to the development of)
    2008-10-26 14:45:12下载
    积分:1
  • 226CAD图形
    s7-200模块图 300的PLC模块和cup的电气图纸设计图库(S7-200 module diagram)
    2020-06-25 10:00:01下载
    积分:1
  • CreateInteractionClient
    test yourejb code from standalone java file
    2011-05-10 15:50:57下载
    积分:1
  • 696518资源总数
  • 104573会员总数
  • 29今日下载