Welcome![Sign In][Sign Up]
Location:
Search - MyShape

Search list

[JSP/JavaMyShape

Description: Java实现简单画图程序随机生成三种图形颜色等-Java program to achieve a simple drawing of three randomly generated color graphics, etc.
Platform: | Size: 5120 | Author: mqq | Hits:

[JSP/JavaTest3

Description: 定义4个类,MyShape、MyLine、MyRectangle和MyOval,其中MyShape是其他三个类的父类。MyShape为抽象类,包括图形位置的四个坐标;一个无参的构造方法,将所有的坐标设置为0;一个带参的构造函数,将所有的坐标设置为相应值;每个坐标的设置和读取方法;abstract void draw(Graphics g)方法。MyLine类负责画直线,实现父类的draw方法;MyRectangle负责画矩形,实现父类的draw方法;MyOval负责画椭圆,实现父类的draw方法。编写一个应用程序,使用上面定义的类,随机选取位置和形状,绘制20个图形。示例输出如图所示。-Define four classes, MyShape, MyLine, MyRectangle and MyOval, which is the other three MyShape parent class. MyShape is an abstract class, including the location of the four graphical coordinates a no-argument constructor, all of the coordinates is set to 0 a parameterized constructor, all the coordinates to the corresponding value coordinates of each set and read method abstract void draw (Graphics g) method. MyLine class responsible for drawing straight lines, to achieve the parent class draw method MyRectangle responsible for drawing a rectangle, the draw method to achieve the parent class MyOval responsible for the ellipse, the draw method to achieve the parent class. Write an application using the class defined above, randomly selected location and shape, draw 20 graphics. Sample output as shown.
Platform: | Size: 1024 | Author: 封强 | Hits:

[OtherMyShape

Description: 自动绘制矩形,圆形,直线,椭圆图形,改变颜色线条宽度等功能。是MFC图形绘制的例子。-Automatic drawing rectangular, circular, linear, elliptical graphics, change the color and line width function. Example the MFC graphics rendering.
Platform: | Size: 46080 | Author: | Hits:

[JSP/JavaMypicture

Description: 定义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.
Platform: | Size: 13312 | Author: 晕晕 | Hits:

[OtherLab5-3

Description: 创建一个绘图应用程序,随机地绘制线条、矩形和椭圆。 创建一组“灵活的”形状类。如果为这些类提供一个Graphics对象,将绘制位置告诉他们,他们就知道如何绘制自身。这些类的名字应为MyLine,MyRect和MyOval(提示:可有共同的父类MyShape)。使用随机数来挑选形状类型和形状的位置。 随机地创建20个MyLine,MyOval和MyRect类的对象,然后调用该图形的draw方法把它显示出来。-Create a drawing application, randomly draw lines, rectangles and ellipses. Create a set of flexible shape classes. If you provide a Graphics object for these classes, the drawing position to tell them, they will know how to draw itself. The class name should be MyLine, MyRect and MyOval (Tip: You can have a common parent class MyShape). Using a random number to the position and shape of the shape type. Randomly create 20 MyLine, MyOval and MyRect class object, and then call the draw method of the graphic display it.
Platform: | Size: 13312 | Author: 夏花 | Hits:

CodeBus www.codebus.net