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

Designing Reusable Code in C++

( WT-1012-180 )


     Course DescriptionBack To Top

Course Offered in Partnership With DigitalThink

This course teaches students the basics of polymorphism and inheritance, focusing on function and operator overloading and on creating class hierarchies. Students will gain skills throughout the course that help them build adaptable, reusable object-oriented C++ code.

This course requires a text editor. Students will need to use both Netscape and Internet Explorer version 4.0 browsers to complete some exercises in this course. This course also requires a computer running Windows, Macintosh, or UNIX.

eMentoring Services are included with this course.

  • Course length: 15 hours

  • Course details
        id:      WT-1012-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++ programmmers

     
         Prerequisites Back To Top

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

  • Demonstrate completion of Building Classes in C++, or equivalent knowledge and experience
  •  
         Skills Gained Back To Top

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

  • Create special conversion member functions to convert from a user-defined type to built-in type
  • Overload member functions and operators to give them additional meanings
  • Create class hierarchies using derived classes, virtual functions, and abstract base classes
  •  
         Related Courses Back To Top

  • Before: Introduction to C++
  • Before: Building Classes 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: Ad hoc polymorphism Back To Top

  • Ad hoc polymorphism
  • Polymorphism
  • Conversion and overloading
  • ADT conversions
  • Conversion functions
  • Comparing conversion operators and constructors
  • Overloading functions
  • Signature-matching algorithm
  • Selection algorithm for function overloading
  • Overload function selection algorithm example
  • Module wrap-up


  • Module 3: Overloading operators Back To Top

  • Overloading operators
  • Why overload operators?
  • Types of operators that can be overloaded
  • Friend functions
  • Why friend functions are needed
  • The operator keyword
  • Unary and binary operator overloading
  • Overloading unary operators
  • Overloading binary operators
  • Overloading the assignment operator
  • Overloading I/O operators
  • Overloading the structure pointer operator
  • Overloading new and delete
  • Tips for overloading operators
  • Module wrap-up


  • Module 4: Inheritance and pure polymorphism Back To Top

  • Inheritance and pure polymorphism
  • What is inheritance?
  • Virtual member functions and pure polymorphism
  • A derived class
  • The ISA relationship
  • Constructors for base and derived classes
  • Typing conversions and visibility
  • Example of typing conversion and visibility
  • Virtual functions
  • Virtual function rules
  • Virtual function selection
  • Abstract classes and pure virtual functions
  • The const_cast and reinterpret_cast operators
  • The dynamic_cast operator
  • Runtime Type Identification
  • The typeid operator and type_info class
  • Exceptions
  • Module wrap-up


  • Module 5: Course project Back To Top

  • Course project
  • A simple ecological simulation
  • Lifeform abstract base class
  • Lifeform inheritance hierarchy
  • Lifeform interaction rules
  • Initializing and displaying the simulation
  • Design your own simulation
  • Module wrap-up


  • Module 6: Course wrap-up Back To Top

  • Course wrap-up
  • We'd love your feedback
  • Help us help you learn!

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