|
 |
 |
 |
 |
 |
 |
 |
 |
 |
 |
 |
 |
 |
 |
 |
class
account {.
|
|
public:
|
|
account(const char* ="none",
float=0);
|
|
virtual void statement();
|
|
private:
|
|
...
|
|
};
|
|
class
checking : public account {.
|
|
...
|
|
protected:
|
|
void statement();
|
|
};
|
|
class
student : public checking {.
|
|
...
|
|
protected:
|
|
void statement();
|
|
};
|
|
app: student smith("Kyle smith",
5000, "UT");
|
account*
pa = &smith;
|
|
pa->statement(); //okay.
|
|
|
|