Object Oriented Programming Using C++: Restricted

You might also like

Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 4

Object Oriented Programming using C++

1. OBJECTIVES
 To enable the participants to develop good object oriented design and use C++
effectively.
2. Duration
 This is a Five Day Program
3. Entry Profile
 Basic Programming Concepts
 Medium degree of proficiency in OO concepts
 low degree of proficiency in “C++” concepts
4. Course Contents

Day1:
Module1:Procedural based programming (C to C++)
Module 2: Object based programming.

Day2:
Module 2: Object based programming (continued)
Module 3: User defined conversions.
Day3:
Module 4: Operator overloading
Module 5: Object oriented programming
Day4:
Module 6: Exception Handling
Module7: Generic programming (Templates)

Day5:
Module 8: Standard Template Library

Restricted 1
Detailed Course Contents

Module 1
Procedural based programming (C to C++) – Advanced features of C++98
and their better alternatives in C++11 + usage + best practices
 Function Declaration
 Defining variables at point of use. – implications of not doing so
 Global scope resolution
 Const and default linkage type of global const variables
 Const pointers and pointers to const. – implications of const when compile
time resolution cannot be identified + const Vs Static internal difference
 References – implication on memory management
 Inline Functions – implication and common pitfalls + Vs Macro, when to use
 New Typecast Operators – C++11 feature
 Namespaces
 Standard Headers Names – hidden namespaces
 C++ style casts + internal implementation + implication of use
 Free Store management – new/delete Vs ::new/delete + what happens inside
 Default function arguments – common pitfalls + avoiding ambiguity
 Resolution of overloaded functions – data type conversion, narrowing,
promotion
 auto – use in c++11
 decltype – code analysis through decltype
 uniform initialization
 constexpr – C++11
 static_assert – compile time assertion
 range based for loops – c++98 vs c++1
 nullptr – c++11
 scoped enums – c++11

Module 2
Object based programming. – best practices + common pitfalls + examples
 C++ classes and structs
 Components of a class
 Classification of member functions
 Member Access Control
 Constructors
 Classes lacking default constructors
 Default constructor
 Constructor with parameters.
 Copy constructor – compiler implementation + deep vs shallow
 Designing a String Class.
 Passing and returning objects by reference – memory perspective
 Constant member functions and data members
 Mutable members
 Initialization list.
 Explicit Constructors
 Non-Public Constructor
 Destructors
 “this” Pointer – this and reference
 Static Class Members – implication on linker
 Pointers to class Members
 delegating constructors
Restricted 2
 rvalue references – C++11 + implication on copy constructor
 move constructors – C++11

Module 3
User defined conversions – common pitfalls + avoiding them
 Converting class object to some objects
 Converting some object to class object
 Conversion operator functions
 Preventing implicit conversions - explicit

Module 4
Operator overloading – C++98 Vs C++11 + implication on objects + best
practices + examples
 Rules pertaining to overloading
 Overloading unary and binary operators
 Implementing the postfix operator in terms of the prefix.
 Overloading I/O Operators
 Overloading Assignment and index operator
 Creating a smart pointer. – C++11 smart pointer
 Creating function objects
 Preventing assignment and copy.
 Overloading new and delete
 When not to overload

Module 5
Object oriented programming – Object based Vs Object Oriented – best
practices + memory perspective + compiler perspective + examples
 Relationship between objects.
 Is a Relation
 Composition
 Visibility of Base members in the derived class
 Private inheritance
 Constructed and destructors
 Name hiding , using declaration
 Virtual Member Functions – implication of virtual on compilation
 Pure Virtual Member Functions
 Inheritance of interface and inheritance of implementation.
 Covariant Return Types
 Interface classes – best practices and common pitfalls + overrides
 vptr and vtable – compile Vs runtime implications + resolution of overloaded
members through vptr and vtable
 Runtime time information (typeid and dynamic cast)
 final and override

Module 6
Exception Handling – C++98 Vs C++11 + best practices + compiler
perspective + runtime perspective
 Traditional Error Handling Methods
 Exception Handling Mechanism – C++98 Vs C++11
 Exception leaving destructors – nothrow vs nothrow(false)
 Throwing Exceptions
 Ways by which an exception can be caught.
Restricted 3
 Re-throwing
 Using smart pointers – common pitfalls + use of exception handling
 Exception Specification
 Standard Exceptions
 noexcept

Module7
Generic programming (Templates) – C++98 Vs C++11 Templates +
examples
 Declaration of a Class Template.
 Outlining class member functions
 Template parameter and argument list
 Template (type, value, template) parameters
 Default Type Arguments
 Static Data Members
 Friendship
 Complete specialization
 Partial Specialization
 Template compilation models
 Function templates
 Use of typename
 Instantiations of template functions
 Argument deduction
 Template Function Specialization
 explicit instantiation
 Member templates
 Inheritance of class templates
 extern templates
 alias templates

Module 8
Standard Template Library – introduction to STL container and algorithms +
implicit guarantees
 Containers, vector, list, deque, choosing an appropriate container
 Algorithms, interaction between algorithms and iterators
 Iterators, the iterator base class and iterator traits
 Associative Containers : Set, Map, List, Multiset, Multimap
 Iterators : input, output, forward, bi-directional & random iterators
 Generic Algorithms - Function Objects
 Container Adaptors , stack and queues
 Iterator Adaptors
 Lambdas – C++98 Vs C++11 Vs C++14

Restricted 4

You might also like