This repository has been archived on 2022-11-09. You can view files and clone it, but cannot push or open issues or pull requests.
patterns-old/lesson_2/scheme

30 lines
382 B
Plaintext

// interface
class Subject
{
public:
virtual void registerObserver() = 0;
virtual void removeObserver() = 0;
virtual void notifyObserver() = 0;
};
class Observer
{
public:
virtual void update() = 0;
};
// classes
class ConcreteSubject : public Subject
{
public:
void getState();
void setState();
};
class ConcreteObserver : public Observer
{
public:
};