Published online by Cambridge University Press: 06 July 2010
Object-oriented programming (OOP) is just one in a series of technologies that has been deemed as the savior of software. In the world of computing, software often gets a bad reputation because so many programs are delivered to the end user late, with significant bugs, and not designed to completely solve the problem the program was written to solve. Object-oriented programming provides a set of tools and techniques to help programmers manage program complexity.
OOP DEFINED
Object-oriented programming is a programming technique that involves structuring a program around special, user-defined data types called classes. Classes are used to break a problem up into a set of objects that interact with each other. A class consists of both the data that define an object and subprograms, called methods, which describe the object's behavior.
A language that is to be called a true OOP language must implement three concepts—encapsulation, polymorphism, and inheritance. Without all three of these features, a programming language can be considered object-based, as Visual Basic 6 is, but all three must be present for the language to be considered a true object-oriented language.
Encapsulation
In the traditional, third-generation programming language (such as earlier versions of Basic, C, and Fortran), all programs consist of two primary elements—program statements and data. The program statements are used to perform operations on the data, but the two elements are always considered to be separate parts of a computer program.
To save this book to your Kindle, first ensure [email protected] is added to your Approved Personal Document E-mail List under your Personal Document Settings on the Manage Your Content and Devices page of your Amazon account. Then enter the ‘name’ part of your Kindle email address below. Find out more about saving to your Kindle.
Note you can select to save to either the @free.kindle.com or @kindle.com variations. ‘@free.kindle.com’ emails are free but can only be saved to your device when it is connected to wi-fi. ‘@kindle.com’ emails can be delivered even when you are not connected to wi-fi, but note that service fees apply.
Find out more about the Kindle Personal Document Service.
To save content items to your account, please confirm that you agree to abide by our usage policies. If this is the first time you use this feature, you will be asked to authorise Cambridge Core to connect with your account. Find out more about saving content to Dropbox.
To save content items to your account, please confirm that you agree to abide by our usage policies. If this is the first time you use this feature, you will be asked to authorise Cambridge Core to connect with your account. Find out more about saving content to Google Drive.