Code:#include<string>#include<iostream>
using namespace std;
class Dog
{
void setValues( int, int, string);
public:
void bark(){cout << "WOOF!" << endl;}
void setAge(int yrs) {age = yrs;}
void setWeight ( int ibs ) { weight = ibs ; }
void setColor (string hue ) { color = hue ; }
int getAge() { return age ; }
int getWeight() { return weight ; }
string getColor() { return color ; }
};
void Dog::setValues ( int age, int weight, string color)
{
this->age = age;
this->weight = weight;
this->color = color;
}
int main()
{
Dog fido;
fido.setValues( 3, 15, "brown");
cout << "Fido is a " << fido.getColor() << " dog " << endl;
cout << "Fido is " << fido.getAge() << " years old." << endl;
cout << "Fido weighs " << fido.getWeight() << " pounds " << endl;
fido.bark();
Dog pooch;
pooch.setValues( 4, 18, "gray" );
cout << "Pooch is a " << pooch.getAge();
cout << " year old " << pooch.getColor();
cout << " dog who weighs " << pooch.getWeight();
cout << " pounds. ";
pooch.bark();
return 0;
}