CS 455 Lecture Notes
Week Two, Tuesday: Abstract Data Types and C++ Classes
Classes and Members
Programming Example: Throttle Class
- Class head
- Member list: public section, private section
- Using a class
- Using a member function
- Demonstration program
- Implementing member functions
Constructors
- Default constructor
- Automatic default constructor
- Parameter constructor
- Copy constructor
Header and Implementation Files
- Header File (contains private member data declarations and private and public function declarations)
- Implementation file (contains function definitions)
- Sample program
This page established September 4, 1999; last updated September 4, 1999.