| 59 | } |
| 60 | |
| 61 | class Distance |
| 62 | { |
| 63 | private: |
| 64 | float Km, M; |
| 65 | |
| 66 | public: |
| 67 | void setKm(int Km) |
| 68 | { |
| 69 | this->Km = Km; |
| 70 | } |
| 71 | void setM(int M) |
| 72 | { |
| 73 | this->M = M; |
| 74 | } |
| 75 | Distance operator==(Distance &d) |
| 76 | { |
| 77 | if ((Km == d.Km) && (M == d.M)) |
| 78 | { |
| 79 | cout << "They are EQUAL.\n"; |
| 80 | return *this; |
| 81 | } |
| 82 | else |
| 83 | { |
| 84 | cout << "NOT EQUAL.\n"; |
| 85 | return *this; |
| 86 | } |
| 87 | } |
| 88 | }; |
| 89 | void DistanceSecond() |
| 90 | { |
| 91 | Distance d1, d2; |
nothing calls this directly
no outgoing calls
no test coverage detected