#include #include "height.h" using namespace std; height::height(int f, double i) : centimeters{(f * 12.0 + i) * 2.54} {} height::height(double i) : centimeters{i * 2.54} {} height::height() : centimeters{0} {} void height::print() const { int feet = static_cast(centimeters / 2.54) / 12; double inches = (centimeters / 2.54) - (feet * 12); cout << feet << " feet, " << inches << " inches"; } double height::getCentimeters() const { return centimeters; } double distance(const height& h1, const height& h2) { return abs(h1.centimeters - h2.centimeters) / 2.54; }