Write a C++ program (in OOP) with the following details:
Create a program with a constructor function. The program should contain the ff: • A Distance class and constructor • Variables for inch and feet • Member function o to get distance to show distance o to add the inputs to subtract the inputs Output: Enter Distance1 : Enter Value of feets: 10 Enter value of inches: 7 Enter Distance2: Enter Value of feets: 15 Enter value of inches: 8 Distance 1 details: Feets : 10 Inches: 7 Distance 2 details: Feets: 15 Inches: 8 Adding two distances : Feets : 26 Inches: 3 Subtracting two distances : Feets: -5 Inches: 1
Create a program with a constructor function. The program should contain the ff: • A Distance class and constructor • Va
-
answerhappygod
- Site Admin
- Posts: 899604
- Joined: Mon Aug 02, 2021 8:13 am
Create a program with a constructor function. The program should contain the ff: • A Distance class and constructor • Va
Join a community of subject matter experts. Register for FREE to view solutions, replies, and use search function. Request answer by replying!