I have a task of calculating helicopter's necessary fuel intake. There are four operations a helicopter can do:

* Holding
* Raising
* Landing
* Straight

User selects the helicopter's actions by entering the parameters. User can select as many operations as s/he wants. At the end, total fuel is calculated according to the user's parameters and operation selection. I need to create this system with OOP approach. 

Here is what I've done so far: 

```
#include <iostream>
#include <stdio.h>
using namespace std;

class FlyingMode {
   protected:
    float time, fuel_rate, start, end, pace, distance;
    float total;
   public:
      FlyingMode(float a=0, float b=0, float c=0,
              float d=0, float e=0, float f=0){
         time = a;
         fuel_rate = b;
         start = c;
         end = d;
         pace = e;
         distance = f;
         total = 0;
      }
      virtual int calcFuel(){
         return 0;
      }
};
class Holding: public FlyingMode{
   public:
      Holding(float a=0, float b=0, float c=0,
              float d=0, float e=0, float f=0):FlyingMode(a, b, c, d, e, f) { }

      int calcFuel(){
         total = (time * fuel_rate * 60);
         return total;
      }
};
class Raising: public FlyingMode{
   public:
      Raising(float a=0, float b=0, float c=0,
                  float d=0, float e=0, float f=0):FlyingMode(a, b, c, d, e, f) { }
      int calcFuel (){
          if(start < end && pace != 0 ){
              total = (end - start)/pace * fuel_rate;
              return (end - start)/pace * fuel_rate;
          }else{
              return 0;
          }
      }
};
class Landing: public FlyingMode{
   public:
      Landing(float a=0, float b=0, float c=0,
                  float d=0, float e=0, float f=0):FlyingMode(a, b, c, d, e, f) { }
      int calcFuel (){
          if(start > end && pace != 0 ){
              total = (start - end)/pace * fuel_rate;
              return (start - end)/pace * fuel_rate;
          }else{
              return 0;
          }
      }
};
class Straight: public FlyingMode{
   public:
      Straight(float a=0, float b=0, float c=0,
                  float d=0, float e=0, float f=0):FlyingMode(a, b, c, d, e, f) { }
      int calcFuel (){
          if(distance != 0 || pace != 0 ){
              total = distance/pace * fuel_rate;
              return distance/pace * fuel_rate;
          }else{
              return 0;
          }
      }
};
// Main function for the program
int main( ){

    float a=0, b=0;
    float c=0, d=0, e=0, f=0;
    float total = 0;
    char op;

    Holding hold;
    Raising raise;
    Landing land;
    Straight straight;

    while(op != 'x') {

        cout << "Enter the move : " << endl;
        cout << "1 ---> Holding Flight" << endl;
        cout << "2 ---> Raising" << endl;
        cout << "3 ---> Landing " << endl;
        cout << "4 ---> Straight Flight " << endl;
        cout << "5 ---> Calculate fuel" << endl;
        cout << "x ---> Exit " << endl;

        op = std::getchar();

        if(op == '1') {
            cout << "Enter time : ";
            cin >> a;
            cout << "Enter fuel rate: ";
            cin >> b;
        }
        if(op == '2') {
            cout << "Enter starting altitude: ";
            cin >> c;
            cout << "Enter ending altitude: ";
            cin >> d;
            cout << "Enter raising pace: ";
            cin >> e;
            cout << "Enter fuel rate: ";
            cin >> f;
        }
        if(op == '3') {
            cout << "Enter starting altitude:  ";
            cin >> c;
            cout << "Enter ending altitude:  ";
            cin >> d;
            cout << "Enter landing pace:  ";
            cin >> e;
            cout << "Enter fuel rate:  ";
            cin >> b;
        }
        if(op == '4') {
            cout << "Enter ending altitude: ";
            cin >> d;
            cout << "Enter starting altitude: ";
            cin >> c;
            cout << "Enter fuel rate: ";
            cin >> b;
        }
        if(op == '5') {
            FlyingMode *mode;

            hold = Holding(a, b, 0, 0, 0, 0);
            raise = Raising(0, f, c, d, e, 0);
            land = Landing(0, b, d, c, e, 0);
            straight = Straight(0, b, c, d, 0, 0);

            //store holding address

            //call holding fuel
            mode = &hold;
            float hold_result = mode -> calcFuel();
            //call raising fuel
            mode = &raise;
            float raise_result = mode -> calcFuel();
            //call landing fuel
            mode = &land;
            float land_result = mode -> calcFuel();
            //call straight fuel
            mode = &straight;
            float str_result = mode -> calcFuel();
            //calculate total

            /*cout << "hold_result" << hold_result;
            cout << "raise_result" << raise_result;
            cout << "land_result" << land_result;
            cout << "str_result" << str_result;*/
            total = hold_result + raise_result + land_result + str_result;
            cout <<"Total required fuel : "<< total << " kg/second "<< endl;

        }
        if(op == 'x') {
            cout << "System will exit..." << endl;
            return 0;
        }
        else {
            //if(op==(1|2|3|4|5)){}
            //else cout << "Wrong selection." << endl;
            }
    }
    return 0;

}

```

But, it only calculates the total value for the user's first operation selection. Any ideas on how to solve this?