Create a program with a constructor function. The program should contain the ff: • A Distance class and constructor • Va

Business, Finance, Economics, Accounting, Operations Management, Computer Science, Electrical Engineering, Mechanical Engineering, Civil Engineering, Chemical Engineering, Algebra, Precalculus, Statistics and Probabilty, Advanced Math, Physics, Chemistry, Biology, Nursing, Psychology, Certifications, Tests, Prep, and more.
Post Reply
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

Post by answerhappygod »

Create A Program With A Constructor Function The Program Should Contain The Ff A Distance Class And Constructor Va 1
Create A Program With A Constructor Function The Program Should Contain The Ff A Distance Class And Constructor Va 1 (25.98 KiB) Viewed 24 times
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
Join a community of subject matter experts. Register for FREE to view solutions, replies, and use search function. Request answer by replying!
Post Reply