Professional Documents
Culture Documents
C++ Interface Vs Implementation
C++ Interface Vs Implementation
Implementation
CPSC 1070, Donald House, Clemson University
10/25/19
Some Nomenclature
• Interface is that part of a class that is accessible to the
outside, namely what is in the public section of the class.
• This means that data structures and code for a class can
be modified without affecting code making use of the class
Example Interface
Array based stack List based stack
public: public:
Stack(); Stack();
~Stack(); ~Stack();
int main(){
Stack mystack;
int num;
while(!mystack.empty()){
num = mystack.pop();
cout << num << ' ';
}
cout << endl;
return 0;
}
Example Stack and
Queue Interfaces and
Implementations
Download from the schedule page