rendered paste body#include <iostream>
using namespace std;
class cGame {
public:
void door1();
virtual void door2();
virtual void door3();
};//endclass
class cGameShow : public cGame {
public:
void door1();
void door2();
};//endclass
void cGameShow::door1() {
cout << "you win a new computer!" << endl;
}
void cGameShow::door2() {
cout << "you win something that resembles the appearance of nothing." << endl;
}
void cGame::door1() {
cout << "in door one." << endl;
}
void cGame::door2() {
cout << "in door two." << endl;
}
void cGame::door3() {
cout << "in door three." << endl;
}
void selectDoor(cGame &theGame) {
theGame.door1();
theGame.door2();
theGame.door3();
}
void main() {
cGameShow wheelOfFortune;
wheelOfFortune.door1();
wheelOfFortune.door2();
wheelOfFortune.door3();
selectDoor(wheelOfFortune);
}