int sum = 0, n;
do {cin>>n; sum+=n;}while (n!=0);
cout<<sum;
The following cose will be used to copy assignment operator for CarCounter
<u>Explanation:</u>
Complete Program:
#include <iostream>
using namespace std;
class CarCounter
{
public:
CarCounter();
CarCounter& operator=(const CarCounter& objToCopy);
void SetCarCount(const int setVal)
{
carCount = setVal;
}
int GetCarCount() const
{
return carCount;
}
private:
int carCount;
};
CarCounter::CarCounter()
{
carCount = 0;
return;
}
// FIXME write copy assignment operator
/* Your solution goes here */
CarCounter& CarCounter::operator=(const CarCounter& objToCopy)
{
if(this != &objToCopy)
carCount = objToCopy.carCount;
return *this;
}
int main()
{
CarCounter frontParkingLot;
CarCounter backParkingLot;
frontParkingLot.SetCarCount(12);
backParkingLot = frontParkingLot;
cout << "Cars counted: " << backParkingLot.GetCarCount();
cout << endl << endl;
system("pause");
return 0;
}
Answer:
The team did not adequately formalize the software's design
Explanation:
The most logical reason for this confusion is the fact that the team did not adequately formalize the the software design.
The design approach has to do with clearly defining the architectural modules of the application. The requirements in the software requirement specification document would serve as input for the next phase. The documents are prepared and they give a definition of the overall system architecture.
The team got confused because they did not go through this phase of the 10-phase SDLC model.