登录
首页 » Java » Mypicture

Mypicture

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

  • Digitaldiary
    windows Digital diary
    2014-11-10 17:47:19下载
    积分:1
  • pointer-program
    常见的指针编程题目和对应的程序答案,适合C语言初学者使用。(Common pointer programming problem and the corresponding procedures, suitable for beginners to use C language)
    2013-08-29 14:43:13下载
    积分:1
  • 实现通常代理服务器的基本功能。可以通过简单的参数设置实现网络中各客户端机器共享代理上网,同时可以监控网络状况。...
    实现通常代理服务器的基本功能。可以通过简单的参数设置实现网络中各客户端机器共享代理上网,同时可以监控网络状况。-proxy server usually achieve the basic functions. Through a simple set of parameters to achieve the network client machines to share Internet access agents, but can also monitor network status.
    2022-11-26 12:10:03下载
    积分:1
  • TCPconnect
    安卓Socket网络编程的一个简单例子,利用tcp协议,实现网络数据传输功能,适合于初学者。(Andrews Socket network programming examples, using tcp protocol, network data transmission.)
    2020-06-26 17:20:02下载
    积分:1
  • 遗传模拟退火算法求解TSP问题matlab代码
    说明:  解决车辆路径问题,改进的模拟退火和遗传算法,全面详细,适用于解决VRP问题和物流车辆规划(To solve the vehicle routing problem, the improved simulated annealing and genetic algorithm, comprehensive and detailed, suitable for solving VRP problems and logistics vehicle planning)
    2020-12-22 15:39:07下载
    积分:1
  • 3121211
    观察甚至直接,, 开发工具VB 提供者123 ·一个气象报文解报处理的 源程序(Even directly, the development tool VB provider 123 a source program for weather message interpretation)
    2019-04-07 17:02:16下载
    积分:1
  • ATM
    编写一个控制台程序,模拟在ATM机的存款和取款过程,当输入给定的卡号和密码(初始卡号和密码到数据文件里查看)时,系统能登录ATM系统,根据用户的身份不同显示不同的程序界面;取款   每次取款金额只能为100的倍数,总额不超过2000元,不允许透支。且取款之后,要记录取款的金额和时间。 存款   每次存款金额只能为100的倍数,总额不超过2000元。 修改密码   新密码长度不小于6位,不允许出现6位完全相同的情况,只有旧密码正确,新密码符合要求,且两次输入相同的情况下才可以成功修改密码。(Write a console program to simulate the ATM deposits and withdrawals process, when you enter a given number and password (the initial number and password to the data file view), the system can log in ATM systems, according to the user' s identity different display different The program interface withdrawal amount each withdrawal can only be a multiple of 100, the total does not exceed 2,000 yuan, does not allow overdrafts. And withdrawals after the withdrawal of the amount to be recorded and time. Deposit Amount per Deposit only a multiple of 100, totaling no more than 2,000 yuan. Change Password New Password length not less than six, allowed six identical situation, only the old password is correct, the new password meets the requirements, and enter the same case twice before they can successfully change the password.)
    2013-10-14 22:50:17下载
    积分:1
  • httpclient
    说明:  支持post 和get的httpclient ,是windonw平台,拿来直接用功能编译就可以生成动态库(Httpclient, which supports post and get, is a windonw platform, which can be directly compiled with functions to generate dynamic libraries.)
    2019-01-14 22:35:48下载
    积分:1
  • IP地址合法性判断,在VISUA C++6.0下运行通过
    IP地址合法性判断,在VISUA C++6.0下运行通过-IP address to determine the legality of, at VISUA C++6.0 run through
    2022-03-23 07:51:40下载
    积分:1
  • JCalculator
    能实现简单的加,减,乘,除四则运算,完整源码,能运行(for simple calculate)
    2015-06-09 18:16:16下载
    积分:1
  • 696518资源总数
  • 105065会员总数
  • 14今日下载