首页 > 福建 > 厦门市 > 类是什么意思,类的意思是什么

类是什么意思,类的意思是什么

来源:整理 时间:2022-10-13 23:41:47 编辑:厦门本地生活 手机版

本文目录一览

1,类的意思是什么

几把

类的意思是什么

2,类是什么意思

  类  【字义】:很多相似事物的综合:种类相似,好像:类同。

类是什么意思

3,有教无类中的类是什么意思

种类的意思~~~~~~~~(……) 类别 也就是不同的种类 这是单纯意思 而这个词中就是指不同的人 类别的意思,指的是什么人都可以接受教育

有教无类中的类是什么意思

4,生产品类是什么意思

产品类型是指某一品牌产品类别,具体指把产品进行归类。 例如:我国汽车产品类别: 我国汽车法规标准中大致有以下两个分类标准: 1、汽车分为L类、M类、N类、O类汽车 L类指两轮或三轮车(如摩托车等);

5,编程里面的类和方法是什么意思

类是一个抽象的集合,抽象的意思是把一些事物的公共部分提取出来放在一个集合里面。在编程里类是指一组相同的属性和功能的一个抽象集合,统称为成员。 方法是一个过程,方法也属于类里面的一个成员(功能),方法是一个具体的执行过程,而类什么也做不了,它仅仅是一个概念,就好像人类什么也做不了,人才能做事情,做的事情的过程就是一个方法。

6,java里的类和对象分别是什么意思

marry是一个人 marry 就是 一个具体的人 而通常我们说人时,并不是说 marry 但是 如果谁不知道什么是人,你可以告诉他,像marry那样的就是人了 所以:marry就是人这个类的一个具体的对象(也叫实例) 要有marry(对象),首先得有人这个类(可以理解为类型),再 new 一个人才行,然后你可以把给这个 new 出来的人 一个名字,比如marry。以后大家说到marry时,就是指的这个新人了,然而,marry始终是属于人的类型。 当然,你还可以说他是生物,或是女人,这就关系到继承了

7,Java类的定义

package java.lancs ;/** * Graphics objects for practical classes (Java 1.1 version) * @author Roger Garside/Richard Cardoe * @version Last Rewritten: 24/Sept/97 */import java.awt.* ;import java.awt.event.* ;/* * class to hold details about the shape to draw */class BasicShape // name of the shape - RECTANGLE, OVAL, etc. int shape ; // dimensions of the shape int x, y, w, h ; // colour of the shape Color colour ; // constructor to initialise the variables to default values public BasicShape() shape = -1 ; x = -1 ; y = -1 ; w = -1 ; h = -1 ; colour = Color.green ; } // end of constructor method // constructor to initialise the variables to specifier values public BasicShape(int sh, int x1, int y1, int w1, int h1, Color col) shape = sh ; x = x1 ; y = y1 ; w = w1 ; h = h1 ; colour = col ; } // end of constructor method } // end of class BasicShape/* * a canvas to draw on */class BasicCanvas extends Canvas BasicGraphics parent ; // constructor method public BasicCanvas(BasicGraphics p) parent = p ; } // end of constructor method // called when class is initialised to put window on the screen // or when window needs to be redrawn public void paint(Graphics g) Dimension d = getSize() ; int cx = d.width / 2, cy = d.height /2 ; g.setColor(Color.black) ; g.drawRect(1, 1, d.width - 3, d.height - 3) ; int yy = 25 ; while (yy < d.height) if (yy % 100 == 0) g.drawLine(1, yy, 11, yy) ; g.drawLine(d.width - 13, yy, d.width - 3, yy) ; } else g.drawLine(1, yy, 6, yy) ; g.drawLine(d.width - 8, yy, d.width - 3, yy) ; } yy += 25 ; } int xx = 25 ; while (xx < d.width) if (xx % 100 == 0) g.drawLine(xx, 1, xx, 11) ; g.drawLine(xx, d.height - 13, xx, d.height - 3) ; } else g.drawLine(xx, 1, xx, 6) ; g.drawLine(xx, d.height - 8, xx, d.height - 3) ; } xx += 25 ; } for (int i = 0 ; i < parent.noOfShapes ; i++) g.setColor(parent.shapeList[i].colour) ; if (parent.shapeList[i].shape == BasicGraphics.RECTANGLE) g.drawRect(parent.shapeList[i].x, parent.shapeList[i].y, parent.shapeList[i].w, parent.shapeList[i].h) ; } else if (parent.shapeList[i].shape == BasicGraphics.FILLED_RECTANGLE) g.fillRect(parent.shapeList[i].x, parent.shapeList[i].y, parent.shapeList[i].w, parent.shapeList[i].h) ; } else if (parent.shapeList[i].shape == BasicGraphics.OVAL) g.drawOval(parent.shapeList[i].x, parent.shapeList[i].y, parent.shapeList[i].w, parent.shapeList[i].h) ; } else if (parent.shapeList[i].shape == BasicGraphics.FILLED_OVAL) g.fillOval(parent.shapeList[i].x, parent.shapeList[i].y, parent.shapeList[i].w, parent.shapeList[i].h) ; } else if ((parent.shapeList[i].shape == BasicGraphics.TRIANGLE) || (parent.shapeList[i].shape == BasicGraphics.FILLED_TRIANGLE)) int x1 = parent.shapeList[i].x ; int y1 = parent.shapeList[i].y ; int w1 = parent.shapeList[i].w ; int h1 = parent.shapeList[i].h ; Polygon p = new Polygon() ; p.addPoint(x1, y1 + h1) ; p.addPoint(x1 + w1, y1 + h1) ; p.addPoint(x1 + (w1 / 2), y1) ; p.addPoint(x1, y1 + h1) ; if (parent.shapeList[i].shape == BasicGraphics.TRIANGLE) g.drawPolygon(p) ; else g.fillPolygon(p) ; } } } // end of method paint } // end of class BasicCanvas/* * class to draw simple shapes in a window */ public class BasicGraphics extends Frame implements ActionListener // maximum width of window private static final int MAX_WIDTH = 600 ; // maximum height of window private static final int MAX_HEIGHT = 400 ; /** * definition of a rectangle shape */ public static final int RECTANGLE = 1 ; /** * definition of an oval shape */ public static final int OVAL = 2 ; /** * definition of a triangle shape */ public static final int TRIANGLE = 3 ; /** * definition of a filled-in rectangle */ public static final int FILLED_RECTANGLE = 4 ; /** * definition of a filled-in oval */ public static final int FILLED_OVAL = 5 ; /** * definition of a filled-in triangle */ public static final int FILLED_TRIANGLE = 6 ; BasicShape[] shapeList = new BasicShape[50]; int noOfShapes = 0; private BasicShape newShape = new BasicShape(); private Button quit ; /** * constructor to lay out the window */ public BasicGraphics() setTitle("BasicGraphics Window") ; setSize(MAX_WIDTH, MAX_HEIGHT + 50) ; BasicCanvas c = new BasicCanvas(this) ; add("Center", c) ; Panel p = new Panel() ; p.setLayout(new FlowLayout()) ; quit = new Button("Quit") ; p.add(quit) ; quit.addActionListener(this) ; add("South", p) ; } // end of constructor method /** * handles button depression events, etc. */ public void actionPerformed(ActionEvent event) dispose() ; System.exit(0) ; } // end of method actionPerformed /** * set the type of shape that you want to draw * @param shape e.g. BasicGraphics.RECTANGLE */ public void setShape(int shape) if ((shape != RECTANGLE) && (shape != FILLED_RECTANGLE) && (shape != OVAL) && (shape != FILLED_OVAL) && (shape != TRIANGLE) && (shape != FILLED_TRIANGLE)) System.err.println("This is not a valid shape"); System.exit(1); } newShape.shape = shape ; } // end of method setShape /** * set the dimensions of the shape that you want to draw * @param x x-coordinate of the top left hand corner of the bounding * rectangle * @param y y-coordinate of the top left hand corner of the bounding * rectangle * @param w width of the bounding rectangle * @param h height of the bounding rectangle */ public void setDimensions(int x, int y, int w, int h) if (newShape.shape == -1) System.err.println("You need to set the shape first"); System.exit(1); } if ((x < 5) || (y < 5) || (w < 5) || (h < 5) || (x + w > MAX_WIDTH - 5) || (y + h > MAX_HEIGHT - 5)) System.err.println("Invalid dimensions supplied") ; System.exit(1); } newShape.x = x ; newShape.y = y ; newShape.w = w ; newShape.h = h ; } // end of method setDimensions /** * set the colour of the shape that you want to draw * @param colour the Color type (Color.red, Color.blue, etc.) */ public void setColour(Color colour) if (newShape.x == -1) System.err.println("You need to set the dimensions first"); System.exit(1); } newShape.colour = colour ; shapeList[noOfShapes] = new BasicShape(newShape.shape, newShape.x, newShape.y, newShape.w, newShape.h, newShape.colour) ; noOfShapes++ ; newShape = new BasicShape() ; } // end of method setColour/** * draws the window on the screen with the specified shapes */ public void draw() setVisible(true) ; } // end of method draw } // end of class BasicGraphics
class aprivate l int ; //长private w int ; //宽public int getValue(int l,int w) return l*w; //计算其面积}}……晕不想写来。这个是作业题。帮你写了 太不道德了,
point point=new point(-1,-1); point.setx(0); point.sety(0); point.move(3); point.move(4); 能明白什么意思吧?简略写的 x和y要保证不是负数,x或y值为0时,再向边界移动是否会出现异常
文章TAG:类是什么意思是什么什么什么意思

最近更新

  • 摩羯和天蝎配对,摩羯和天蝎配么

    摩羯和天蝎配么非常理想的一对十二星座也有四大天王,分别是土象的万王之王--摩羯、火象的地王--狮子,与白羊座的--孩子王、水象的阴王--天蝎。这四大天王相遇时,难免火气都大一些;不 ......

    厦门市 日期:2023-05-06

  • 慕生忠,慕生忠有怎样的思想品格

    本文目录一览1,慕生忠有怎样的思想品格2,慕生忠的简介3,慕生忠是一个怎样的人4,慕生忠将军是怎样的人5,说说慕生忠是1个甚么样的人1,慕生忠有怎样的思想品格贪心{0}2,慕生忠的 ......

    厦门市 日期:2023-05-06

  • 那就这样吧吉他谱,求那就这样吧的吉他谱子要六线的谢谢

    本文目录一览1,求那就这样吧的吉他谱子要六线的谢谢2,寻那就这样吧吉他谱子要图片类型的3,那就这样吧吉他谱简单4,那就这样吧吉他谱c调1,求那就这样吧的吉他谱子要六线的谢谢http ......

    厦门市 日期:2023-05-06

  • 什么是写真,中国古代画论称写物之真现代人也爱画真

    画画写字的人都喜欢栩栩如生,所以叫写真,在写真的口号里,似乎写真成了女人的专利,男人的副业,写真,中文原意是画人物肖像,这是中国人物画的传统名称,在中国古代画论中,“写真”指的是“ ......

    厦门市 日期:2023-05-06

  • 人体五行对应关系,五行与人体五个器官的对应关系

    本文目录一览1,五行与人体五个器官的对应关系2,人体的五行怎么分3,人体五行是肝心脾肺肾对应木火土金水谁能告诉我为什么这么对应4,人体五行是什么1,五行与人体五个器官的对应关系肾, ......

    厦门市 日期:2023-05-06

  • 正能量壁纸,正能量图片

    正能量图片http://www.360doc.com/content/13/0804/08/12528116_304604181.shtml你看看这个好吗。有很多,充满正能量的图片 ......

    厦门市 日期:2023-05-06

  • 男女生活,两性人如何生活

    两性人如何生活其实你的外貌打扮是男还是是女?如果是看起来像女人,应该按女人生活,洗手间只去有挡板的单间。洗澡最好是家里装个电热器洗,不要去大众澡堂,或者单间洗澡也可以2,男女性生活 ......

    厦门市 日期:2023-05-06

  • 离别不舍的句子,求超级伤感的离别的句子

    求超级伤感的离别的句子2,表达不舍得的句子1,求超级伤感的离别的句子人生七苦:生、老、病、死、怨憎会、爱别离、求不得。“爱别离”三字最伤感了。2,表达不舍得的句子一、别后悠悠君莫问 ......

    厦门市 日期:2023-05-05