Before I do that though, let me try and give you an analogy to keep this in mind of why we want to basically build these abstractions and what we need in order to have them work together.
在我们看例子之前请让我打个比方,以便你们能记住我们,为什么要建立这些抽象,以及要使它们协调工作,我们需要做些什么。
What it's designed to do is to give you the resources you think you need so that I can focus on measuring whether you'velearned anything as opposed to whether you've remembered, memorized anything, OK, and of course, something to calculate with.
这样做的目的是给与你们,认为需要的资源,这样我就能专心于,衡量你们是否已经学到了什么,而不是你们是否记得了什么,背下了什么,还有,当然,要计算一下。
Computing square root. I'm going to capture it in a piece of code, I'm going to be able to refer to it by a name, and I'm going to suppress the details, meaning inside of that computation, you don't need to know what it does. You just need to know, if I give it the right kind of input, it'll give me back an input that satisfies the contract that I set up.
比如计算平方根,我会用一段代码来说明,我将给它命名,并且忽略细节,意思就是在这一段计算过程中,你不用知道它做了什么,你只需知道,如果我进行了正确的输入,它将会给我符合条件的输出。
All right, so we can go to today's notes, and in terms of the notes, what we're going to start with is finishing material that's going to be relevant for exam 1, and I told you on Wednesday that actually I'd give you some information today in terms of what you need to do to prepare for exam 1.
好,下面我们进入今天的讲义内容,而依照讲义,我们今天首先,要把第一次考试要求的最后一部分内容讲完,而且我周三曾经告诉过大家,我会在今天把一些信息告诉大家,是关于如何准备第一次考试的。
应用推荐