May 2012
Intermediate to advanced
679 pages
16h 56m
English
Object-oriented programming languages help us to model the real world data in more structured fashion. Let us describe the features of object-oriented language in detail.
In the above example of class Date, we are putting three variables and two functions together into a bundle. There is an invisible shell around this data. In other words, we are encapsulating the data. It is more secure. You cannot use these functions without corresponding object. This adds much safety to the code.
You cannot tamper day, month or year. They are actually hidden from your program (main and other functions). This is the principle of data hiding. Data is available only through predefined interface ...
Read now
Unlock full access