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;
Already registered? Login
Not Account? Sign up
Enter your email address to reset your password
Back to Login? Click here