Previous Section
 < Day Day Up > 
Next Section


Summary

The chapter first provided a thorough discussion on the three fundamental principles of object-oriented programming: encapsulation, polymorphism, and inheritance. It then introduced the readers to the three most commonly used object-oriented languages: Object Pascal, C++, and Java. Most Microsoft Windows-based developers are familiar with Borland Delphi and C++Builder, which are very powerful and prominent Object Pascal and C++ implementations, respectively. However, for Linux-based developers, these two tools are together available in the single product Kylix and are fairly new, as this product has been recently introduced to the Linux community. This is a somewhat lengthy chapter because it focuses on three languages together. However, the chapter will provide sufficient foundation for the topics to be discussed later in the book.

The semantics of the Object Pascal language are discussed to an extent such that programmers new to this language will be able to start coding quickly on their own. Most precisely, the command-line compilation and options are discussed and supplemented by simple and easy-to-understand examples. The Delphi classes, interfaces, variants, and procedure and function data types are some of the many complex data types discussed in this chapter, in addition to the other most commonly used simple data types.

Next, the C++ language advanced concepts are explained to a great extent, starting the discussion with some of the preprocessor directives, structs, unions, and classes. Considerable time has been spent discussing concepts such as pointers and dynamic memory management, object references, virtual methods and polymorphism, templates, namespaces, and casting. Next, the keyword extensions made by Borland in the Kylix C++ implementation are discussed in order to facilitate reading of Chapter 6. The chapter concludes with the discussion on the object construction sequence while building CLX style objects.

Finally, the principles of Java language are considered, and wherever applicable, comparative discussion is provided with respect to C++, as these two languages have a number of similarities. With respect to Java, the class model, inheritance principles, interfaces, virtual classes, language control constructs, and exception handling are discussed.

The following chapters will provide an exemplified approach to using these languages in building more useful applications.



Previous Section
 < Day Day Up > 
Next Section