Create two classes DistMeter and DistFeet, which stores the values of distances.

b) Create two classes DistMeter and DistFeet, which stores the values of distances. DistMeter stores in meter and cm and DistFeet in feet and inches. Write a program that read values for objects of both the classes and add object of DistMeter and DistFeet using friend function. A function should return equivalent meter in float. Also write main() function for illustration of the usage of the two classes DistMeter and DistFeet.

Leave a Reply