• Вход
  • Быстрая регистрация
Перейти на сайт
так английский ты еще не учил!
Регистрация Вход
  • Материалы
  • Курсы
  • Словарь

Programming Methodology (Stanford). Lecture 19 / 28

Материал готовится,
пожалуйста, возвращайтесь позднее
Instructor (Mehran Sahami): Howdy. So welcome back to yet another fun filled, exciting day in CS106A. I don’t know if there’s any days actually we started where I didn’t say that. I don’t know. Someday, I should go back and watch the video. But they’re all fun filled and exciting, aren’t they? So it’s not like false advertising. There’s no handouts today. A little breather after the four handouts you got last time. And another quick announcement, if you didn’t pick up your midterm already, you can pick it up. They’re along the back wall over there in alphabetical order, so hopefully you can pick it up if you haven’t already gotten yours. If you’re an SITN student and you’re worrying about where you can get your midterm, it will be sent back to you through the SITN courier, unless you come into class and you picked it up, in which case it won’t be sent back to you because then you already have it. All righty. So any questions about anything we’ve done before we delve into our next great topic? All right. So time for our next topic. And our next topic is really a little bit of a revisiting of an old topic, kind of an old friend of ours, and then we’re gonna push a little bit further. So remember our old interface. I always love it when math books say like “recall” and they have some concept, and I look at that, and I’m like, “Oh, recall the interface. Oh, what good times the interface and I had, like we were holding hands and running through a garden, the interface and I, and I recall our happy times together.” So now’s the time to recall the interface. What was an interface? Right? Last time when we talked about interface, we talked about something really generic, which was basically – it was a set of methods. And this was a set of methods that we sort of designate that some sort of classes actually shares. So it’s a common set of functionality – common functionality among a certain set of classes.

And we talked a little bit about how yeah, there’s – if you had some notions of [inaudible] classic standing in other class, you get sort of that same idea, but the real generality of interface is with – that you could have certain things that weren’t related to each other in an object hierarchy or a class hierarchy that you still wanted to have some common methodology. And you sort of saw this all before, so in the days of yore when we talked about G objects. Remember? Those little fun graphical objects like the GLabel and the GRect, and all that happy stuff. And we said there were a bunch of interfaces there. Like for example, there was an interface called GFillable, and the GFillable interface had certain methods associated with it, like you could set something to be filled, or you could check to see if it was filled. And we said some of the objects actually implemented this interface, so for example, GRect, and GOval, and a couple others actually implement this GFillable interface. And there were other things like GLabel where it didn’t make sense to have a filled or unfilled label, so GLabel didn’t implement this interface. Okay? And it was just kind of a set of functionality. We’re gonna kinda return to this idea of interface to talk about some of the things that we’ve actually done so far, like array lists, and some new concepts you’re gonna learn, and how it relates to our notion of interfaces.

Загрузка...
Выбрать следующее задание
Ты добавил
Выбрать следующее задание
Ты добавил
Лео-переводчик
Мобильные приложения
FAQ Поддержка Вакансии Блог Сотрудничество