MCPcopy Create free account
hub / github.com/Rustam-Z/cpp-programming / Distance

Class Distance

Lab_14/Source.cpp:61–88  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

59}
60
61class Distance
62{
63private:
64 float Km, M;
65
66public:
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};
89void DistanceSecond()
90{
91 Distance d1, d2;

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected