const Member Functions

Table of contents:

Review Questions

1.

What is the main advantage of using a struct?

2.

Describe at least one difference between a class and a struct.

3.

How does class scope differ from block scope?

4.

Describe two situations where it is okay to use friend functions.

5.

How does a static data member differ from a non-static data member?

6.

What is the difference between a static member function and a non-static member function?

7.

What does it mean to declare a member function to be const?

8.

Explain what would happen (and why) if a class T had a copy constructor with the following prototype.

T::T(T other);
9.

Critique the design shown in The Company Chart in Exercise 3. What problems do you see with it? In particular, how would you write

Employer::getEmployees() or Position::getEmployer()?


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

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