7019:多继承

Time/Memory Limit:1000 MS/32768 K
Submitted: 341 Accepted: 235

 Problem Description

据最近一则新闻报道,一国外飞行DIY自制出一款三栖飞行器,它可以在陆地上行走,在水中航行,还可以跃出水面或者远离地面在空中飞行,并且可以轻松地在这三种姿态之间切换。现已存在三个直接基类(如下),请为该DIY设计一个类CDiy以管理他的三栖飞行器。
class Car{
public:
 Car(double run):m_run(run){
  
 }
 ~Car(){
  cout<<"Car subobject.\n";
 }
private:
 double m_run;
};
class Ship{
public:
 Ship(double sail):m_sail(sail){
  
 }
 ~Ship(){
  cout<<"Ship subobject.  ";
 }
private:
 double m_sail;
 
};
class Plane{
public:
 Plane(double fly):m_fly(fly){
  
 }
 ~Plane(){
  cout<<"Plane subobject.  "; 
 }
private:
  double m_fly;
 
};

 Input

输入多组数据,每组占一行,分别代表飞行器编号和该型号飞行器的三栖速度。

 Output

每一行数据代表拆除一架三栖飞行器时所释放的提醒信息。每一行都有换行号,包括最后一行。
具体格式请见样例。

 Sample Input

1 45.5 38.3 60.5
3 50.95 47.6 70
5 45 49.5 34.6

 Sample Output

deleting:1  Plane subobject.  Ship subobject.  Car subobject.
deleting:3  Plane subobject.  Ship subobject.  Car subobject.
deleting:5  Plane subobject.  Ship subobject.  Car subobject.

 Recommend

zh