#ifndef LENGTH_H_ 
#define	LENGTH_H_ 
#include <iostream>
using namespace std; 

class Length
{
private:
  int len_inches {0};
public:
  Length() = default;
  Length(int inches)           // constructor that takes inches as arguments
  {
    len_inches = inches;
  }
  Length(int feet, int inches) // constructor that takes feet & inches as arguments
  {
    setLength(feet, inches);
  }  

  void setLength(int feet, int inches)
  {
    len_inches = 12 *feet + inches;
  }

  int getFeet() const
  { return len_inches / 12; }

  int getInches() const
  { return len_inches % 12; }

  friend Length operator+(Length a, Length b);
  friend Length operator-(Length a, Length b);
  friend bool operator< (Length a, Length b);
  friend bool operator== (Length a, Length b);

  // Type conversion operators
  operator int() const
   { return len_inches; }
  operator double() const;
  
};

#endif

