Definitions derived from Real Life

These following examples of definitions can be found in a book ( Advanced Java Networking ), sent by Vickss to the class mailing list…

The only interesting paragraphs i found up to now….
i looked for others, but could fine more :S

Each instance of the object maintains a similar-looking but entirely different set of variables. Changing the values in one instance does not result in a change in the values of the variables of the other instances. Remember, an instance of a class is like your BMW 328i convertible. It looks as cool as every other BMW 328i, but just because you modify yours to remove the annoying electronic inhibition of speed, that doesn’t mean every other BMW also will be changed!

Maybe you’re tired of driving your minivan because your husband (or wife) makes you! What you really want is a BMW Z3 roadster. So, you drive your Toyota van down to the nearest BMW dealer and trade it in for the Z3. Now, because you have a different car, does that mean you have to learn how to drive all over again?
This is obviously not the case (unless you just traded in a Volvo, in which case you have to learn to drive to begin with). That’s because the world, yes the same world that brought you Elvis and Hillary Clinton, is inherently object-oriented.

Code Reuse
Let’s say that you are putting together your son’s bicycle on Christmas morning. The instructions call for you to use a Phillips-head screwdriver. You take the screwdriver out of the toolbox, use it, and put it back. A few minutes later, you need the screwdriver again. Surely you would use the same screwdriver, not go to the hardware store and buy a new one!

Imagine your grandfather fishing in a stream. He knows that as long as he stays there, he’s going to get a bite. Somewhere, somehow, sometime a fish is going to come down that stream, and your grandfather is going to get it.
Just as your grandfather is the consumer of fish, your applications are either
consumers or providers of data. In Java, all input and output routines are handled through streams.

Let’s say you’re sitting in your living room watching another Washington Redskins victory. You get bored watching the massacre of the Dallas Cowboys, and you decide that you would like to see the 49ers game in progress. In the good old days, you would have to actually switch channels and choose between one or the other. But, these days, televisions have Picture-in-Picture (PIP) capability. By pressing the PIP button on your trusty remote control, you can watch the Redskins demolish the Cowboys on a little box in the corner of the TV while watching the 49ers on the rest
of the screen. This is a prime example of multithreaded programming. The little screen and the big screen share resources (in this case, the area of the full television screen), but they are
not able to affect one another.

You may also like...

  • Nice analogy and kind of fun to read..

    The format and the style of the book doesn’t appear boring.. its something you can read on

    compared to the “Design and concepts book” coulouris (movais lourd sa)

    it lacks diagrams.. they wrote pages pages of stuffs.. which could be easily explained in a simple diagram and a few notes

    mais ki pou fer.. textbook sa.. bizin lire!

  • wow..
    can any1 get me the title and author?

  • Advance Java Networking
    by
    Prashant & I
    lol, mo fine rode koner ‘I’ la ki sane la sa, mais malheureusement li pas mentioner oken place!