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.
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
We'll see a lot in this course. But I'll give you a preview using the jelly blobs of doom
Similar in idea, but different in syntax.
this.ivar
rather than just ivar
, where ivar
is an instance variableThose 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.
Glad to hear it!