.NODE

Encapsulation

Encapsulation is the first conceptual step in object-oriented programming. It involves

  • Packaging data with the functions that can operate on that data in well-named classes
  • Providing clearly named and well-documented public functions that allow users of the class to do whatever needs to be done with objects of this class
  • Hiding implementation details

The set of public function prototypes in a class is called its public interface.

The set of non-public members, as well as the function definitions themselves, comprise the implementation.

One immediate advantage of encapsulation is that it permits the programmer to use a consistent naming scheme for the members of classes. For example, there are many different classes for which it might make sense to have a data member that contains the ID of the particular instance. We could adopt the convention of calling such a data member m_ID in every class that needs one. Because class member names are not visible outside the class scope, there is no danger of ambiguity if a member name is also used somewhere else in the program.


Introduction to UML

Part I: Introduction to C++ and Qt 4

C++ Introduction

Classes

Introduction to Qt

Lists

Functions

Inheritance and Polymorphism

Part II: Higher-Level Programming

Libraries

Introduction to Design Patterns

QObject

Generics and Containers

Qt GUI Widgets

Concurrency

Validation and Regular Expressions

Parsing XML

Meta Objects, Properties, and Reflective Programming

More Design Patterns

Models and Views

Qt SQL Classes

Part III: C++ Language Reference

Types and Expressions

Scope and Storage Class

Statements and Control Structures

Memory Access

Chapter Summary

Inheritance in Detail

Miscellaneous Topics

Part IV: Programming Assignments

MP3 Jukebox Assignments

Part V: Appendices

MP3 Jukebox Assignments

Bibliography

MP3 Jukebox Assignments





An Introduction to Design Patterns in C++ with Qt 4
An Introduction to Design Patterns in C++ with Qt 4
ISBN: 0131879057
EAN: 2147483647
Year: 2004
Pages: 268
Similar book on Amazon

Flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net