class method implementation advice

closed account (S23vqMoL)
solved. thanks
Last edited on
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
bool isGreaterThan (const English_length & rhs) 
{  //  rhs = Right Hand Side
    if (yards_ > rhs.yards)
        return true;
    if (yards_ < rhs.yards_)
        return false;
    //  yards must be  = 
    if (feet_ > rhs.feet_)
      return true;
    if (feet_ < rhs.feet_)
       return false;
    // feet must be =
    if (inches_ > rhs.inches_)
        return true;
    return false;  // inches must be <= 
}




Last edited on
Topic archived. No new replies allowed.