Working with Objects
In This Chapter
Working with objects
Using object literals
Making objects easier to use by naming them correctly
At one time, programming was entirely about writing procedures. You wrote a procedure to perform a task in a way that the computer could understand. Even if you used a higher level programming language, the process was the same — writing a procedure telling the computer to do something in terms it could understand.
As computer science progressed, it was found that people could relate better to coding scenarios that model the real world rather than the abstract world of the computer. Object Oriented Programming (OOP) is a technique whereby the developer creates a model of a real-world entity and then manipulates that entity with code. The underlying infrastructure translates the model into terms that the computer can understand. Objects are simply models of items you interact with in the real world in some way.
Given that objects are models of real-world entities, you need some method ...