Sun Microsystems, Inc.
spacer spacer
spacer   Sun Educational Services  
spacer
black dot
  black fade
spacer
  Course Catalog
logo

Building Classes in C++

( WT-1011-180 )


     Course DescriptionBack To Top

Course Offered in Partnership With DigitalThink

This course teaches students the basics of working with classes and objects in C++. It introduces students to encapsulation, an important aspect of object-oriented programming (OOP), and prepares students to continue exploring OOP techniques and concepts.

This course requires any ANSI C++ compiler. It also requires a computer running Windows, Macintosh, or UNIX.

eMentoring Services are included with this course.

  • Course length: 15 hours

  • Course details
        id:      WT-1011-180
        subscription duration:  180 days
        list price:  $  325.00


     
         Languages Offered Back To Top

    This course is currently available in English only.

     
         Who Can Benefit Back To Top

    C programmers, C++ beginning programmers, and individuals interested in learning classes and objects in C++

     
         Prerequisites Back To Top

    To succeed fully in this course, students should be able to:

  • Demonstrate completion of Introduction to C++, or equivalent knowledge and experience
  •  
         Skills Gained Back To Top

    Upon completion of this course, you should be able to:

  • Write C++ programs that use the class construct to define Abstract Data Types and implement encapsulation of data and behavior
  • Write member functions that act on member data
  • Use constructor and destructor member functions to manage class-defined objects
  • Implement useful dynamic data structures such as a dynamically allocated stack, a bounds checking array, and a singly linked list
  • Use an efficient object disposal schemes
  •  
         Related Courses Back To Top

  • Before: Introduction to C++
  • After: Designing Reusable Code in C++
  •  
         Course Content Back To Top



    Module 1: Course introduction Back To Top

  • Course introduction
  • Prerequisites
  • What you need
  • What to expect
  • Meet your tutor
  • Meet your instructor
  • C++ compilers


  • Module 2: OOP and encapsulation Back To Top

  • OOP and encapsulation
  • Object-oriented programming
  • Type extensibility
  • Encapsulation
  • What is a class?
  • What is an object?
  • Member functions
  • Using a member function
  • Private and public access
  • The ADT's interface
  • Class or struct?
  • Module wrap-up


  • Module 3: Inside a class Back To Top

  • Inside a class
  • Scope resolution operator
  • Unary form
  • Binary form
  • External member functions
  • Overloading member functions
  • Nested classes
  • Static members of a class
  • The this pointer
  • Defining static and const member functions
  • Implementation of static and const member functions
  • Program dissection
  • Module wrap-up


  • Module 4: Constructors Back To Top

  • Constructors
  • Memory allocation for variables
  • What is a constructor?
  • What is a destructor?
  • Constructor and destructor example
  • An initialization constructor
  • Using a constructor
  • A default constructor
  • Constructor initializers
  • Constructors as conversions
  • Module wrap-up


  • Module 5: Constructing a dynamically sized stack Back To Top

  • Constructing a dynamically sized stack
  • Design of the stack
  • Stack constructors
  • Copy constructors
  • Defining a copy constructor
  • Using a destructor
  • Module wrap-up


  • Module 6: Useful classes for dynamic structures Back To Top

  • Useful classes for dynamic structures
  • A "safe" array
  • Grouping arrays in a class
  • A singly linked list
  • The prepend() member function
  • The del() member function
  • The print() member function
  • The release() member function
  • Using the list
  • Reference counting
  • A string class using reference counting
  • Using reference counting
  • Module wrap-up


  • Module 7: Course wrap-up Back To Top

  • Course wrap-up
  • Course project
  • Where to go from here
  • Help us help you learn!

  • Terms of UsePrivacy PolicyFeedback Copyright 1994-2002 Sun Microsystems, Inc.