A furlong is a module of distance equal to 220 yards (1/8 mile).Write two classes in C++
Question:
A furlong is a module of distance equal to 220 yards (1/8 mile).Write two classes in C++ that implement distances in the followingmanner:
The first class keeps track of distances as a whole number offurlongs, a whole number of yards, and a number of feet, which mayhave a fractional component.
The second class keeps track of distances as a whole number ofkilometers, followed by a number of meters, which may have afractional component.
Implement conversions between the two classes, ensuring thatconversion in both directions is possible.
Note that the internal view of the data is entirely up to you,but the logical view must match the specifications above. Also notethat the emphasis of this assignment is on the use of conversions.Exhaustive implementations of these classes are therefore notrequired. The ability to declare, output, and convert constitutethe essential elements. The program should still consist of atleast three modules.
Probability and Statistical Inference
ISBN: 978-0321923271
9th edition
Authors: Robert V. Hogg, Elliot Tanis, Dale Zimmerman