102,586 views
35 votes
35 votes
let's have a class named Distance having two private data members such as feet(integer), inches(float), one input function to input values to the data members, one Display function to show the distance. The distance 5 feet and 6.4 inches should be displayed as 5’- 6.4”. Then add the two objects of Distance class and then display the result (the + operator should be overloaded). You should also take care of inches if it's more than 12 then the inches should be decremented by 12 and feet to be incremented by 1.

User Oleksandr Buchek
by
2.7k points

1 Answer

22 votes
22 votes

Answer:

Humildade

Ser justo (Fair Play)

Vencer independente

User Elzell
by
3.2k points