Checkpoint: Polymorphism
Challenge on lesson: Checkpoint: Polymorphism
CHALLENGE
Difficulty: intermediate+25 XP
Build a tiny notification system: class Notifier with a pure virtual void send(const std::string& message) const, a public virtual destructor, and a pure virtual const char* channel() const. Implement EmailNotifier (channel "email", send captures its message) and SmsNotifier (channel "sms"). The test dispatches through std::vector<std::unique_ptr<Notifier>>.
Press Submit to check your solution.
Back to lesson: Checkpoint: Polymorphism