Hot Search : Source embeded web remote control p2p game More...
Location : Home Search - Radius point
Search - Radius point - List
DL : 0
(1) 实现一个Point类,该类包含表示坐标的两个int型变量x、y,构造方法Point()和Point(int xx, int yy),返回x值和y值的int getX()和int getY()方法,计算两点间距离的double distance(Point)方法。其中计算平方根用Math.sqrt()方法。 (2) 实现一个Circle类,该类包含表示圆心的Point型变量center,表示半径的int radius变量,以及构造方法Circle()、Circle(int xx,int yy,int r)、Circle(Point c,int r),返回周长和面积的int perimeter()、double area()方法,返回两个圆是否为同一个圆(返回0)、同心圆(返回1)、相交的圆(返回2)、分离的圆(返回3)、包含的圆(返回4)等关系的int relation(Circle c)等方法。PI值可以用Math.PI常量。 (3) 实现测试上述两个类的ClassTest类。该类在main方法中分别创建若干个Point对象和Circle对象,并调用相关方法,输出方法的返回值,验证其正确性。 (4) 将Point类、Circle类和主类的包名分别调整为p1、p2、p3,并重新运行,验证是否运行正确。
Date : 2008-10-13 Size : 5.16kb User : fangfei

DL : 0
(1) 实现一个Point类,该类包含表示坐标的两个int型变量x、y,构造方法Point()和Point(int xx, int yy),返回x值和y值的int getX()和int getY()方法,计算两点间距离的double distance(Point)方法。其中计算平方根用Math.sqrt()方法。 (2) 实现一个Circle类,该类包含表示圆心的Point型变量center,表示半径的int radius变量,以及构造方法Circle()、Circle(int xx,int yy,int r)、Circle(Point c,int r),返回周长和面积的int perimeter()、double area()方法,返回两个圆是否为同一个圆(返回0)、同心圆(返回1)、相交的圆(返回2)、分离的圆(返回3)、包含的圆(返回4)等关系的int relation(Circle c)等方法。PI值可以用Math.PI常量。 (3) 实现测试上述两个类的ClassTest类。该类在main方法中分别创建若干个Point对象和Circle对象,并调用相关方法,输出方法的返回值,验证其正确性。 (4) 将Point类、Circle类和主类的包名分别调整为p1、p2、p3,并重新运行,验证是否运行正确。
Date : 2025-12-31 Size : 5kb User : fangfei

DL : 0
java事件处理事例,输入圆心坐标,单击鼠标取得半径画圆-java event handling example, enter the center point coordinates, click the mouse to obtain a radius of Circle
Date : 2025-12-31 Size : 1kb User : 范头头

编写一个java Applet应用程序,写出相应的超文本文档。能在网页上, 由大至小,以下列颜色,分别填充10个同心圆。提供的影像文档名为:Archery.jpg(446×291) 功能要求:  圆心坐标:[300,300]  半径分别为:20,40,60,80,… 180,200  同心圆的颜色,由大至小分别为:  浅灰色lightGray ,青色 cyan ,灰色 gray ,黄色 yellow , 粉红色 pink , 桔黄色 orange, 洋红色magenta , 绿色green, 黄色yellow, 红色 red  单击鼠标,来确定射箭运动员相片的位置。  鼠标点击处画一个蓝点  在靶子上标明环数  汉字输出鼠标点击处的环数 -Write a java Applet application, write the corresponding hypertext document. In page, from large to small, in the following colors, each filled with 10 concentric circles. To provide images of the document entitled: Archery.jpg (446 × 291) the functional requirements:  center point coordinates: [300,300]  radius were: 20,40,60,80, ... 180,200  concentric circles of color, from large to small, respectively:  light gray lightGray, cyan cyan, gray gray, yellow yellow, pink, pink, orange yellow and orange, magenta magenta, Green green, yellow yellow, red and red  click of a mouse, to determine the archers photo position.  mouse click to draw a blue dot at the target marked   Chinese output rings at the ring a few mouse clicks
Date : 2025-12-31 Size : 184kb User : liuzguang

DL : 0
实验3类、对象以及包的使用(6学时) 1.实验内容 (1) 实现一个Point类,该类包含表示坐标的两个int型变量x、y,构造方法Point()和Point(int xx, int yy),返回x值和y值的int getX()和int getY()方法,计算两点间距离的double distance(Point)方法。其中计算平方根用Math.sqrt()方法。 (2) 实现一个Circle类,该类包含表示圆心的Point型变量center,表示半径的int radius变量,以及构造方法Circle()、Circle(int xx,int yy,int r)、Circle(Point c,int r),返回周长和面积的int perimeter()、double area()方法,返回两个圆是否为同一个圆(返回0)、同心圆(返回1)、相交的圆(返回2)、分离的圆(返回3)、包含的圆(返回4)等关系的int relation(Circle c)等方法。PI值可以用Math.PI常量。 (3) 实现测试上述两个类的ClassTest类。该类在main方法中分别创建若干个Point对象和Circle对象,并调用相关方法,输出方法的返回值,验证其正确性。 -Experiment 3 classes, objects, and use the package (6 hours) 1. Experimental content (1) implement a Point class that contains the coordinates of the two int variables x, y, constructor Point () and Point (int xx , int yy), return x and y values ​ ​ int getX () and int getY () method to calculate the distance between two points of the double distance (Point) method. Which calculate the square root with Math.sqrt () method.
Date : 2025-12-31 Size : 1kb User : duanduan

DL : 0
这是一个求圆半径的程序。并把它加以显示出来。-This is a process of circular radius. And to display it.
Date : 2025-12-31 Size : 1kb User : lin

DL : 0
一个简单圆,有圆心半径,已知半径,求周长和面积。已知某点求是否在圆上。-A simple circle, a circle radius, known radius, strives for the pupil. Known to some point whether in the round.
Date : 2025-12-31 Size : 5kb User : 张正
CodeBus is one of the largest source code repositories on the Internet!
Contact us :
1999-2046 CodeBus All Rights Reserved.