Code:

Code:
//the Elevation.h file 
#ifndef ELEVATION_H
#define ELEVATION_H




class Elevation
{
    public:
        Elevation(int d, int m, int y, int a, int b, int c, int e);
        void movingwater();
        void infiltration();


    private:
        int firstelevation;
        int secondelevation;
        int thirdelevation;
        int fourthelevation;
        int fifthelevation;
        int sixthelevation;
        int seventhelevation;
};


#endif // ELEVATION_H






//the Shapiro.h file 
#ifndef SHAPIRO_H
#define SHAPIRO_H


#include "Elevation.h"
using namespace std;


class Shapiro
{
    public:
        Elevation be;
        Elevation bo;
        Shapiro();
        Shapiro(Elevation be, Elevation bo);
        void Hapiro();


    private:
        Elevation altitudeone;
        Elevation altitudetwo;
};


#endif // SHAPIRO_H










//the Elevation.cpp file 
#include "Elevation.h"
#include<iostream>
using namespace std;


Elevation::Elevation(int d, int m, int y, int a, int b, int c, int e)
{
  firstelevation=d;
  secondelevation=m;
  thirdelevation=y;
  fourthelevation=a;
  fifthelevation=b;
  sixthelevation=c;
  seventhelevation=e;
}
void Elevation::movingwater(){




        cout << " water is removable " << endl;


}




void Elevation::infiltration(){


        cout << " water is not removable " << endl;




    }




//the Shapiro.cpp file 
#include "Shapiro.h"
#include "Elevation.h"
#include<iostream>
using namespace std;


Shapiro::Shapiro()
{
}


Shapiro::Shapiro(Elevation be, Elevation bo)
:altitudeone(be), altitudetwo(bo)
{


}
void Shapiro::Hapiro(){


        if(altitudeone>altitudetwo){
            altitudeone.movingwater();
            int water=10;
            altitudeone-=water;
            altitudetwo+=water;
            cout << " water is removed " << altitudeone << altitudetwo << endl;
            }
         else {
         altitudetwo.infiltration();
             int water=3;
             altitudetwo-=water-1;
            cout << " water is infiltrated " << altitudetwo << endl;


        }}






//the main.cpp file 


#include <iostream>
#include "Shapiro.h"
#include "Elevation.h"


using namespace std;


int main()
{
    Elevation objone(890, 900, 1000, 1765, 743, 545, 590);
    Elevation objtwo(890, 900, 1000, 1765, 743, 545, 590);
    Shapiro aso (objone, objtwo);


}