This file contains 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
class AbstractClassExample { | |
public: | |
virtual int dieHard()=0; | |
}; | |
class YetAnotherAbstractClassExample: public AbstractClassExample {}; | |
class FinallyConcreteClassExample: public AbstractClassExample { | |
public: | |
int dieHard() { |
This file contains 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
class Device { }; | |
class Tablet : public Device{}; | |
class Iphone : public Device{}; | |
class Mobile : public Device{}; | |
class Person { | |
//Iphone device; rahter then concrete implementation we are using interface | |
Device * device; | |
public: |
This file contains 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
#include <iostream> | |
using namespace std; | |
class ConfigurationManager { | |
private: | |
ConfigurationManager(){ | |
} | |
public: | |
static ConfigurationManager & getInstance() { |