Question: / Program Distance converts either yards or feet to // a record of type Distance. //***************************************************** #include using namespace std; struct Distance { long feet;
/ Program Distance converts either yards or feet to // a record of type Distance. //*****************************************************
#include
struct Distance { long feet; long yards; long miles; };
Distance ConvertYards(long yards); // Post: yards has been converted into a variable of // type Distance.
Distance ConvertFeet(long feet); // Post: feet has been converted into a variable of // type Distance.
void PrintDistance(Distance distance); // Post: A vriable of type Distance is printed as feet, // yards, and miles.
int main() { // FILL IN code to test the operations involving // struct Distance. }
//********* Distance Operations ********************
Distance ConvertYards(long yards) { // FILL IN Code to convert yards to a variable of Distance. }
//******************************************************
Distance ConvertFeet(long feet) { // FILL IN Code to convert feet to a variable of Distance. }
//******************************************************
void PrintDistance(Distance Distance) { // FILL IN Code to print a variable of Distance. }
Fill in the mising code in these operations involving struct Distance.
Fill in the missing code in function main that test the operations with the data used in the discription of the operations. Describe any bugs
Step by Step Solution
There are 3 Steps involved in it
To complete the implementation of the program we need to fill in the missing code for the functions ConvertYards ConvertFeet and PrintDistance as well ... View full answer
Get step-by-step solutions from verified subject matter experts
