虫虫首页|资源下载|资源专辑|精品软件
登录|注册

Circle

  • (1) 实现一个Point类

    (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,并重新运行,验证是否运行正确。

    标签: Point

    上传时间: 2014-11-25

    上传用户:cylnpy

  • (1) 编写一个代表圆柱体的Cylinder类

    (1) 编写一个代表圆柱体的Cylinder类,该类是Circle类的子类。Cylinder类包括圆柱体的高度变量height以及计算圆柱体的体积方法volume()和计算表面积的方法surfaceArea()。 (2) 编写测试Cylinder类的CylinderTest类,并在该类得main方法中调用Cylinder类的相关方法。 (3) 重写Point和Circle类的equals()、toString()方法,并测试这些方法的正确性。

    标签: Cylinder 编写

    上传时间: 2016-08-19

    上传用户:moerwang

  • /*请分别定义图形类Shape(抽象基类)

    /*请分别定义图形类Shape(抽象基类),继承类矩形类Rectangle、正方形类Square、 圆形类Circle;它们具有的方法是计算周长和面积。在另一个类的main函数中分别创建矩形、 正方形和圆形对象,设置所需的属性值,打印其周长和面积。*/

    标签: Shape 定义 图形

    上传时间: 2014-01-15

    上传用户:lili123

  • 分别定义图形类Shape(抽象基类)

    分别定义图形类Shape(抽象基类),继承类矩形类Rectangle、正方形类Square、 圆形类Circle;并且计算周长和面积。在另一个main函数中分别创建矩形、 正方形和圆形对象,设置所需的属性值,打印其周长和面积。(备注:只要把该文件解压,把里面的东东COPY去即可使用)

    标签: Shape 定义 图形

    上传时间: 2017-07-24

    上传用户:wuyuying

  • The software and hardware development fields evolved along separate paths through the end of the 20t

    The software and hardware development fields evolved along separate paths through the end of the 20th century. We seem to have come full Circle, however. The previously rigid hardware on which our programs run is softening in many ways. Embedded systems are largely responsible for this softening. These hidden computing systems drive the electronic products around us, including consumer products like digital cameras and personal digital assistants, office automation equipment like copy machines and printers, medical devices like heart monitors and ventilators, and automotive electronics like cruise controls and antilock brakes. Embedded systems force designers to work under incredibly tight time-tomarket, power consumption, size, performance, flexibility, and cost constraints. Many technologies introduced over the past two decades have sought to help satisfy these constraints. To understand these technologies, it is important to first distinguish the underlying embedded systems elements.

    标签: development the software hardware

    上传时间: 2017-08-14

    上传用户:cjf0304

  • Main program running when workpiece is ready on deferent belt(deferent_ready=ture). * Call Squ

    Main program running when workpiece is ready on deferent belt(deferent_ready=ture). * Call Square_Wave subroutine to generate 0.5ms square wave on P1.2 to drive * electromotor,then drive deferent belt step forward. When it steps to the measure * zone, it stops to be measured. Then call A_D subroutine to transform analog * signals to digital signals , after then call serial subroutine to transfer * digital signals to PC. Call square wave subroutine to drive deferent belt step to * original position waitting for defere ready flag to run the next Circle.

    标签: deferent_ready workpiece deferent program

    上传时间: 2017-08-31

    上传用户:baiom

  • distmesh

    matlab有限元网格划分程序 DistMesh is a simple MATLAB code for generation of unstructured triangular and tetrahedral meshes. It was developed by Per-Olof Persson (now at UC Berkeley) and Gilbert Strang in the Department of Mathematics at MIT. A detailed description of the program is provided in our SIAM Review paper, see documentation below. One reason that the code is short and simple is that the geometries are specified by Signed Distance Functions. These give the shortest distance from any point in space to the boundary of the domain. The sign is negative inside the region and positive outside. A simple example is the unit Circle in 2-D, which has the distance function d=r-1, where r is the distance from the origin. For more complicated geometries the distance function can be computed by interpolation between values on a grid, a common representation for level set methods. For the actual mesh generation, DistMesh uses the Delaunay triangulation routine in MATLAB and tries to optimize the node locations by a force-based smoothing procedure. The topology is regularly updated by Delaunay. The boundary points are only allowed to move tangentially to the boundary by projections using the distance function. This iterative procedure typically results in very well-shaped meshes. Our aim with this code is simplicity, so that everyone can understand the code and modify it according to their needs. The code is not entirely robust (that is, it might not terminate and return a well-shaped mesh), and it is relatively slow. However, our current research shows that these issues can be resolved in an optimized C++ code, and we believe our simple MATLAB code is important for demonstration of the underlying principles. To use the code, simply download it from below and run it from MATLAB. For a quick demonstration, type "meshdemo2d" or "meshdemond". For more details see the documentation.

    标签: matlab有限元网格划分程序

    上传时间: 2015-08-12

    上传用户:凛风拂衣袖

  • 定个Circl

    定义一个Circle,有数据成员radius(半径),设计带有默认参数值的构造函数,成员函数setCircle(),getArea(),计算圆的面积,构造一个Circle的对象进行测试。

    标签: Circl

    上传时间: 2017-05-03

    上传用户:1554522254121

  • Interference Analysis

    We were on the lookout for ice. I was in a 32 foot sailing yacht with writer and explorer Tristan Gooley, undertaking a double-handed sail from Scotland through the Faroes up to 66 33 45.7 N and the midnight sun. Now sailing out of the Arctic Circle we were approaching Iceland from the north, heading for the Denmark Straits, where ice flowed south. The Admiralty Pilot warned of bergs but the ice charts we had sailed with were over a week old. We needed an update.

    标签: Interference Analysis

    上传时间: 2020-05-27

    上传用户:shancjb

  • 最新FPC生产流程介紹

    SMT(Surface mount technology)是可在“板面上”满及焊牢栖多敷“表面黏装零件的電子装配技术.侵贴:1.可在板上雨成同特焊接,封装密度提高50~70%.WW2.l短,提高博输速度3.可使用更高删敷.4.自勤化,快速,成本低.1.表面贴装零件SOIC(small outline integrate Circle)RESISTANCE(電阻)CAPACITANCE(電容)AMPLCC(plastic leaded chip carriers)CONNECT etc.(结器)封装材料1.)陶瓷(BeO):精度高,密封度高(CTE:5~7PPM/℃)封板子熟膨服要求高2.)聚硫胺醚(Polyetherimide):一可用玻璃逛行封合的耐高温熟塑性塑廖,机械,電子性能侵良AwIR各波皆敏感,易分解,生“酸泡”现象.3.)熔融矽砂(Fused silica),暖氧横脂

    标签: fpc

    上传时间: 2022-07-27

    上传用户:zhaiyawei