Last active
June 30, 2024 14:19
-
-
Save trikitrok/ec0fc20d1b52f4602d29 to your computer and use it in GitHub Desktop.
Duck class
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#ifndef DUCK_H_ | |
#define DUCK_H_ | |
class QuackBehavior; | |
class Duck { | |
public: | |
Duck(QuackBehavior * quackBehavior); | |
virtual ~Duck(); | |
void quack(); | |
void changeHowToQuack(QuackBehavior * quackBehavior); | |
protected: | |
QuackBehavior * howToQuack; | |
}; | |
#endif /* DUCK_H_ */ |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment