Proxy pattern: Difference between revisions

Content deleted Content added
m v2.05 - Fix errors for CW project (Link equal to linktext - Whitespace characters after heading)
Line 139:
class ICar {
public:
virtual ~ICar() { std::cout << "ICar destructor!" << std::endl'\n'; }
 
virtual void DriveCar() = 0;
Line 146:
class Car : public ICar {
public:
void DriveCar() override { std::cout << "Car has been driven!" << std::endl'\n'; }
};
 
Line 157:
real_car_->DriveCar();
} else {
std::cout << "Sorry, the driver is too young to drive." << std::endl'\n';
}
}