Quiz

  1. I'd like to talk more about abstraction barriers.

    Sure. Abstraction barriers are important as a way of partitioning information, reducing the amount of stuff we need to keep understand and track of in order to use some feature.

    Take jQuery for example. We can use code like $("h2").css('color','red') without understanding how that is implemented.

    There's the published, documented interface and that's all we need to know.

  2. Can we talk more about the API?

    The API is the published, documented interface to some module/feature/library. It's how one piece of code interacts with another piece of code.

    As opposed to the UI, which is how a human user interacts

  3. I think more examples of using OOP in front-end development could be useful!

    We'll see a lot in this course. But I'll give you a preview using the jelly blobs of doom

  4. How are constructors and methods in JS different from Java?

    Similar in idea, but different in syntax.

    • You always have to use this.ivar rather than just ivar, where ivar is an instance variable
    • You only get one constructor, though it can be pretty flexible because of optional arguments and such.
    • That's all I can think of at the moment; it's been a couple of years since I've done Java. Can anyone else suggest anything?
  5. Why do we use the put(key,val) and get(key) in the DataStore Class for CoffeeRun but not the Truck Class?

    Those are methods on the DataStore class, not the Truck class. Of course, the implementors of the Truck class could have defined such methods, even with entirely different meanings.

    Each class has its own job and role, so it defines the methods that it needs to do that job.

  6. the reading made sense! / everything was clear!

    Glad to hear it!