登录
首页 » Java » Mypicture

Mypicture

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

  • 443070
    post图片源码,例程结合易语言模块小西_HTTP应用模块.ec,实现post上传图片。(post picture source, combined with easy language module routines Konishi _HTTP application modules .ec, upload pictures to achieve post .)
    2015-04-08 09:41:13下载
    积分:1
  • 用Evc开发的一些关于文件操作的序实例源码,供大家下载参考学习...
    用Evc开发的一些关于文件操作的程序实例源码,供大家下载参考学习-Evc development with a number of documents on the operation of the source code examples procedures for downloading information learning
    2023-07-07 19:15:04下载
    积分:1
  • 一个tftp文件传输的客户端 方便初学者学习使用
    一个tftp文件传输的客户端 方便初学者学习使用-a tftp file transfer client convenience beginners learning to use
    2022-06-22 05:44:47下载
    积分:1
  • 50402417
    和树类似,图的遍历是图的一种主要操作,可以通过遍历判别图中任意两个顶点之间是否存在路径、判别给定的图是否是连通图并可求得非连通图的各个连通分量,但对于带权图(网),其最小生成树或最短路径都取决于弧或边上的权值,则需要有特定的算法求解。(and similar trees, graph traversal map is a major operation, Discrimination can traverse map between any two vertices existence trails Discriminant to whether the map graph may seek non- graph the various connectivity components, but with the right plan (net), the minimum spanning tree or shortest path depends on the edge of the arc or the right values, the need for a specific algorithm.)
    2007-01-08 22:32:38下载
    积分:1
  • code
    在给定字符串中找出单词( “单词”由小写字母字符大写字母和构成,其他非字母字符视为单词的间隔, 如、问空格号、数字等等;另外单个字母不算单词);找到单词后,按照长度进行降序排序, (排序时如果长度相同,则按出现的顺序进行排列),然后输出到一个新的字符串中;如果某个单词重复出现多次, 则只输出一次;如果整个输入的字符串中没有找到单词,请输出空串。输出的单词之间使用一个“空格”隔开, 最后一个单词后不加空格。(Identify the word (" word" character from the uppercase and lowercase letters constituted, other non-alphabetic characters as word spacing, such as asking a space number, number, etc. another is not a single letter word) in a given string find words after descending order according to length, (if the same length, the order stated that appears when sorting arranged), and then output to a new string If a word is repeated several times, only output once If the entire input string is not found in word, outputs an empty string. Used between the output of a word " space" separated, no spaces after the last word.)
    2014-02-23 00:19:04下载
    积分:1
  • MyDownloader is an open source application written in C# that is almost a comple...
    MyDownloader is an open source application written in C# that is almost a complete download manager.
    2022-08-14 14:39:05下载
    积分:1
  • VC中调用WebService的问题,其实在Visual Studio.Net(下称VS.NET)及其以后的版本中调用WebService已经变得相当简单。你所...
    VC中调用WebService的问题,其实在Visual Studio.Net(下称VS.NET)及其以后的版本中调用WebService已经变得相当简单。你所要做的只是“找到 WebService的发布地址”,然后将其引用添加到VC项目中即可。接下来VS.NET帮你生成的代理类,会帮你搞定一大堆的麻烦事,包括:网络调用、数据传递等等;什么SOAP啊、网络啊,你都可以不管。 InvokeConsole // 在控制台中调用WebService的Demo InvokeDemo // 在MFC程序中调用WebService的Demo -VC Calling WebService problem, In Visual Studio (hereinafter referred to VS.NET) and its subsequent version called W ebService has become quite simple. You had to do was to "find the publication addresses WebService" then added to the quoted VC project can be. VS.NET help you to the next generation of Acting Class, Bangnigaoding lot of trouble, including : network calling, data transmission, etc.; What SOAP ah, network ah, you can regardless. InvokeConsole// Calling the console in the Demo rooted WebService okeDemo// MFC in proceedings called the Demo WebService
    2022-01-27 19:58:52下载
    积分:1
  • KeyFactoryTestDSA
    Shows a list of bug reports currently in /sdcard/bugreports.
    2013-11-21 23:46:40下载
    积分:1
  • 实用C#实现的 停车场管理系统
    便于停车场对车辆进行管理,本系统主要包括,会员注册,车辆出入库管理,会员查询等,采用序列化方式无需数据库。(It is convenient for parking lot to manage vehicles. This system mainly includes membership registration, vehicle access management, membership query and so on. It does not need database by serialization.)
    2020-12-16 21:19:13下载
    积分:1
  • Memory_distribution_Xiangjie
    程序内存分配方式详解:一个讲解内存分配的教程,word版本很详细值得学习(Memory distribution Xiangjie: a brief tutorial on memory allocation, word version is more worthy of study)
    2010-07-27 17:22:09下载
    积分:1
  • 696516资源总数
  • 106409会员总数
  • 8今日下载