Answers 849D
Exercises
1.class JetPlane : public Rocket, public Airplane
2.class Seven47: public JetPlane- The following is one possible answer:
class Vehicle
{
virtual void Move() = 0;
virtual void Haul() = 0;
};
class Car : public Vehicle
{
virtual void Move();
virtual void Haul();
};class Bus : public Vehicle
{
virtual void Move();
virtual void Haul();
};- The following is one possible answer:
class Vehicle
{
virtual void Move() = 0;
virtual void Haul() = 0;
};
class Car : public Vehicle
{
virtual void Move();
};class Bus : public Vehicle
{
virtual void Move();
virtual void Haul();
};class SportsCar : public Car
{
virtual void Haul();
};class Coupe : public Car
{
virtual void Haul();
};32 0672327112_app_d.qxd 11/19/04 12:30 PM Page 849