这个新类应该像清单 9 这样。
在新类中添加清单5所示的内容。
开始使用这些新类非常容易。
Now I have the ability to say, I've got a new class, I can create instances of a line segment, and it's elements are themselves instances of points. OK?
这就是我们要讲模块化的地方了,现在我可以说,我创建了一个新类,我可以创建线段的实例了,这些实例的元素?
I'm going to call it c point just to make it a little shorter.
但是现在我要去对它做一些改动,那么新版本的类的意思也就是。
应用推荐