write a C++ program
Create a class 'Distance' with data member 'inches'. Along with
member functions that read user inputs and print data
members value, Your class should also have a function that
takes two objects i.e instances of Distance class and
calculate the sum of distances and output in terms of
feets and inches. (1 feet = 12 inches)
input
90
92
output
15' 2"
please use:
int main()
{
Distance d1, d2, d3;
d1.getDistance();
d2.getDistance();
d3.distanceSum(d1,d2);
d3.showDistance();
}
write a C++ program Create a class 'Distance' with data member 'inches'. Along with member functions that read user inpu
-
answerhappygod
- Site Admin
- Posts: 899604
- Joined: Mon Aug 02, 2021 8:13 am
write a C++ program Create a class 'Distance' with data member 'inches'. Along with member functions that read user inpu
Join a community of subject matter experts. Register for FREE to view solutions, replies, and use search function. Request answer by replying!