AquinasTraining.co.uk - training courses. Home  -  FAQ  -  Corporate Plans

C++: Introduction for non-C Programmers (4 day)

CPP-NC4      Course duration (days): 4
Talk to a Training Advisor
Tel. 0800 652 0202
Availability (sort by: location | date)
Request availability by clicking a date.
Central London
City
London (NW1) 17/03/09 £ 1,745
London (NW1) 09/06/09 £ 1,745
Prices exc. VAT.  Courses are vendor approved.
Need help? Contact us now.

About this class

Object-oriented (OO) programming offers greater reliability, maintainability and reusability than older, structured programming methods. C++, a language derived from C, supports OO with a high degree of efficiency and portability. C++ is a well-established, mainstream language used across a broad range of applications.

This course provides a solid foundation in C++ for programmers without experience with the C language. You gain an understanding of key OO programming concepts and valuable hands-on experience developing C++ programs.

Who will the lesson benefit?

This course is for those interested in programming with C++. Professional programming experience other than C programming experience is assumed.

What delegates will learn

  • Create, compile and run C++ programs
  • Read and understand C++ syntax
  • Write functions, decisions, loops and exceptions
  • Declare, use and distinguish variables, constants, arrays, pointers and references
  • Define and implement classes to produce reliable, reusable code
  • Use STL classes and instantiate templates
  • Implement object-oriented designs using encapsulation, inheritance and polymorphism

Contents of this class

Introduction and Overview

  • Relating C, C++, Java and C#
  • The in-class development environment
  • Other development environments

Objects, constants and references

  • Declaring and initialising variables
  • Integer and floating point data types
  • Performing arithmetic calculations and displaying results
  • Passing messages to objects
  • Using references for efficiency and constants for safety

Defining and calling functions

  • Passing arguments to functions and returning values from functions
  • Call-by-value vs. call-by-reference vs. call-by-address
  • Scope, duration and initial values of local temporary and parameter variables

Decisions, loops and logic

  • Making decisions with if/else
  • boolvs. intlogical values
  • if/elsestatement "chains"
  • Performing loops with while and for
  • Equality, relational and logical operators

Increment and decrement operators

Arrays, pointers and strings

  • Declaring and using arrays and pointers
  • Storing strings in character arrays
  • Accessing array elements via pointers
  • Pointers vs. references
  • Standard string class and functions

Defining C++ Classes and Objects

Encapsulating higher-level data types

  • Public member functions and private data members
  • Protected class members
  • Constructors and destructors
  • Member initialisation syntax
  • Self-reference: the this pointer
  • The class member operator (::)

Declaring, accessing and modifying objects

  • Manipulating arrays of objects, pointers to objects and references to objects
  • Invoking member functions
  • const member functions
  • Passing objects by value and by reference

Overloading and templates

  • Simplifying class interfaces
  • Function signatures
  • Overloading assignment (=) and insertion ()
  • friend functions and classes
  • Explicit copy construction
  • Avoiding default assignment and default copy construction
  • Using STL templates to define families of related classes

Separating interfaces and implementations

  • How separation supports code reuse
  • Building header files and code files

Extending Classes Via Inheritance

Deriving new classes from existing classes

  • Construction and destruction of derived objects
  • Is-a-kind-of relationships
  • Reusability via incremental extensions
  • Base classes and derived classes

Utilising polymorphic functions

  • Overriding virtual base class member functions in derived classes
  • Runtime lookup of functions through base class pointers and references

Managing dynamic data

  • Allocating and deallocating memory with new and delete
  • Handling errors with try and catch
  • Avoiding memory leaks

Standards and Extensions

  • Standard vs. platform-specific implementations
  • Applicability to Windows and UNIX/Linux
  • Managed C++, C++/CLI and other extensions