csci3081/ducks/duck1.h

18 lines
285 B
C
Raw Permalink Normal View History

2018-01-29 23:24:20 +00:00
#include <iostream>
#include <string>
using std::string;
class DuckClass {
protected:
string typeOf;
string name;
public:
DuckClass() {
typeOf = "duck";
name = "noname";
}
void display() { std::cout << "I am " << name << ", and I am a " << typeOf << ".\n"; }
};