A) #include using namespace std; class DumbBell; { int weight; public: void setWeight(int); }; void setWeight(int w) { weight = w; } int main() { DumBell bar; DumbBell.setWeight(200); cout return...



A) #include


using namespace std;


class DumbBell;


{


int weight;



public:


void setWeight(int);


};


void setWeight(int w)


{ weight = w; }


int main()


{


DumBell bar;


DumbBell.setWeight(200);


cout <><>


return 0;


}


B) class Change


{



private:


int pennies;


int nickels;


int dimes;


int quarters;


Change()


{ pennies = nickels = dimes = quarters = 0; }



Change(int p = 100, int n = 50, d = 50, q = 25);


};


void Change::Change(int p, int n, d, q)


{


pennies = p;


nickels = n;


dimes = d;


quarters = q;


}



May 26, 2022
SOLUTION.PDF

Get Answer To This Question

Related Questions & Answers

More Questions »

Submit New Assignment

Copy and Paste Your Assignment Here