Complete the following program so it defines an array of 10 Yard objects. The program should use a loop to ask the user for the length and width of each yard. Then it should use a second loop to display the length and width of each yard. To do this you will need to add two member functions to the Yard class.
#include <iostream>
using namespace std;
class Yard
{
private:
int length, width;
public:
Yard()
{ length = 0; width = 0; }
void setLength(int l)
{ length = l; }
void setWidth(int w)
{ width = w; }
};
int main ()
{
// Finish this program.
}
We need at least 10 more requests to produce the solution.
0 / 10 have requested this problem solution
The more requests, the faster the answer.