#ifndef DISTANCE_H_
#define DISTANCE_H_

using namespace std;
#include <iostream>

//const to facilitate conversions between the two classes

const double FEET_IN_METERS = 0.3048;
const double FURLONG_TO_FEET = 660;

class Furlong;
class Metric;

class Furlong
{
public:

    Furlong(int fur = 0, int yar = 0, int fee = 0.0);

    // Copy Constructor.

    Furlong( const Furlong& rhs );

    // Destructor.

    ~Furlong(void);

    // Assignment operator=.
    Furlong&    operator=(const Furlong& rhs);

    int furlong;
    int yards;
    double feet;

};

class Metric 
{

public:
Metric(int kilo = 0, double mete = 0.0);

Metric (const Metric& rhs);

~Metric(void);

Metric& operator=(const Metric& rhs);

Metric (Furlong& f);

operator Furlong();

int kilometers;
double meters;
};

#endif

// -----

#include <stdlib.h>
//#include "Distances.h"

//FURLONG CLASS DEFINITIONS

//Constructor

Furlong::Furlong(int fur, int yar, int fee)
{
    furlong = fur;
    yards = yar;
    feet = fee;
}

// Copy Constructor.

Furlong::Furlong( const Furlong& rhs )
{
    furlong = rhs.furlong;
    yards = rhs.yards;
    feet = rhs.feet;
}

    // Destructor.

Furlong::~Furlong(void)
{

}

    // Assignment operator=.

Furlong& Furlong::operator=(const Furlong& rhs)
{

    furlong = rhs.furlong;
    yards = rhs.yards;
    feet = rhs.feet;

    return *this;

}
//METRIC CLASS DEFINITONS



Metric::Metric(int kilo, double mete)
{
    kilometers = kilo;
    meters = mete;
}
Metric::Metric(const Metric& rhs)
{

    kilometers = rhs.kilometers;
    meters     = rhs. meters;
}

Metric::~Metric(void)
{

}

Metric& Metric::operator=(const Metric& rhs)
{
    kilometers = rhs.kilometers;
    meters     = rhs.meters;

    return *this;
}

// conversion constructor

Metric::Metric (Furlong& f)
{
 kilometers = 3;
 meters = 2.0;
}

//conversion operator

Metric::operator Furlong()
{

    return Furlong(1, 2, 3.0);
}

// -----

#include <stdlib.h>
//#include "Distances.h"


using namespace std;

int main() 
{
Furlong one(1,2,3.0); 
Furlong three(4,5,6.0);
Metric two(7,8.0);
Metric four(9, 10.0);

one = two;
four = three;


return 0;
}