(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類,該類是CIRCLE類的子類。Cylinder類包括圓柱體的高度變量height以及計算圓柱體的體積方法volume()和計算表面積的方法surfaceArea()。 (2) 編寫測試Cylinder類的CylinderTest類,并在該類得main方法中調用Cylinder類的相關方法。 (3) 重寫Point和CIRCLE類的equals()、toString()方法,并測試這些方法的正確性。
上傳時間: 2016-08-19
上傳用戶:moerwang
/*請分別定義圖形類Shape(抽象基類),繼承類矩形類Rectangle、正方形類Square、 圓形類CIRCLE;它們具有的方法是計算周長和面積。在另一個類的main函數中分別創建矩形、 正方形和圓形對象,設置所需的屬性值,打印其周長和面積。*/
上傳時間: 2014-01-16
上傳用戶:lili123
分別定義圖形類Shape(抽象基類),繼承類矩形類Rectangle、正方形類Square、 圓形類CIRCLE;并且計算周長和面積。在另一個main函數中分別創建矩形、 正方形和圓形對象,設置所需的屬性值,打印其周長和面積。(備注:只要把該文件解壓,把里面的東東COPY去即可使用)
上傳時間: 2017-07-25
上傳用戶:wuyuying
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-15
上傳用戶:cjf0304
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
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
上傳用戶:凜風拂衣袖
定義一個CIRCLE,有數據成員radius(半徑),設計帶有默認參數值的構造函數,成員函數setCIRCLE(),getArea(),計算圓的面積,構造一個CIRCLE的對象進行測試。
標簽: Circl
上傳時間: 2017-05-03
上傳用戶:1554522254121
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
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