英语翻译A numerical solution of (5.26) can be obtained by the st

yuki2145202022-10-04 11:39:541条回答

英语翻译
A numerical solution of (5.26) can be obtained by the straightforward extension of the Planet class as shown in Listing 5.5.To simplify the drawing of the particle trajectories,the PIanet2 class defines an inner class Mass,which extends Circle and contains a Trail.Whenever a planet moves,a point is added to the trail so that its location and path are shown on the plot.Inner classes are an organizational convenience that save us the trouble of having to create another file,which in this case would be named Mass.Java.When we compile the PIanet2 class,we will produce a bytecode file named PIanet2$Mass.cl ass in addition to the file Plane t2.class.Inner classes are most effective as short helper classes which work in conduction with the containing class,because they have access to all the data (including private variables) in the containing class.

已提交,审核后显示!提交回复

共1条回复
xc5l9l 共回答了12个问题 | 采纳率100%
A numerical solution of (5.26) can be obtained by the straightforward extension of the Planet class as shown in Listing 5.5.
如表5.5所示,数值解(5.26)可以通过Planet类的简单延伸获得.
To simplify the drawing of the particle trajectories,the PIanet2 class defines an inner class Mass,which extends Circle and contains a Trail.
为了简化粒子运动轨迹的作图,PIanet2类定义了一个内部类Mass.Mass扩展了Circle并包含一个Trail.(译者注:Circle和Trail极可能也是类.)
Whenever a planet moves,a point is added to the trail so that its location and path are shown on the plot.
每当一个行星(planet)移动时,这一点即被添加到的轨迹(trail)中,以便将它的方位和路径显示在图中.
Inner classes are an organizational convenience that save us the trouble of having to create another file,which in this case would be named Mass.Java.
内部类是组织上的一个便利,免去了我们必须另建一个文件--这里可能会被命名为Mass.Java--的麻烦.
When we compile the PIanet2 class,we will produce a bytecode file named PIanet2$Mass.class in addition to the file Plane t2.class.
当我们编译PIanet2类时,除Plane t2.class之外,我们还会生成一个名为PIanet2$ Mass.class的字节码文件.
Inner classes are most effective as short helper classes which work in conduction with the containing class,because they have access to all the data (including private variables) in the containing class.
内部类作为短的辅助性类在其所属类的输导下工作时最为有效,因为他们能获得其所属类中的所有数据(包括私有变量).
1年前

相关推荐