Model the World with Objects
Click the video below to watch the content or continue reading.
WHAT
In software development, there is a famous paradigm called “object orientation”, or OO for short. Such a paradigm applies to the analysis, design and programming stages of the development cycle which are commonly referred by the OOA, OOD and OOP acronyms respectively. An object is something that can be described and can also perform actions. These two features are commonly known as properties and methods such that properties refer to a set of characteristics that describe the object and methods denote the actions that can be performed on and by it.
An object is an abstract way of identifying anything in the real world, even human beings. Dog, cat, chair, desk, house, window, automobile, computer, doctor, lawyer, man, woman, you name it. A dog, for example, can be described using properties like color, date of birth, breed, height, weight, color of eyes. Also, a dog can execute actions like walk, run, bark, sleep, jump and play; and actions can be performed on dogs like haircut, shower, and vaccination. Business oriented examples of objects are: customer, supplier, bank account, inventory item, song, author, and artist; it all depends upon the kind of system to be developed.
HOW
How do we identify objects? It is, in fact, very much like recognizing a subject in a sentence. Just find the involved “who’s” and “what’s” and you will get the objects.
Who and what participate in a banking system? Customers, tellers, accounts, transactions (deposits, checks, and wire transfers) are all part of it.
Who and what participate in an inventory system? Customers, suppliers, items, item categories, transactions (purchases, sales, and estimates) are some objects.
Who and what participate in an online music store? Artists, authors, songs, music genres and language are good choices.
After having gathered a set of “possible” objects, next step is to define the object's properties and methods and this job must be done individually. In other words, we have to describe each object in the best possible way and determine which actions or operations it can perform and/or can be performed on it. A customer of a bank, for example, should have an id, name, birth date, email, phone number, address, and password that describe him/her. Among the actions, new customers can be added and existing ones can be deleted and updated. A customer can make deposits, withdraw funds, get his/her balance, open new account, delete an account, and transfer funds from one account to another.
As you can see, this is a long process and much care must be taken to get a precise object model representation of a system.
CONCLUSION
Definitely, the object oriented paradigm is an excellent tool to model information systems. Objects are a natural way to prototype real life situations of any kind in a clear and concise manner.
Visit us at Gatoware