Home / Expert Answers / Computer Science / can-anyone-sve-this-in-c-solve-given-the-following-class-definition-6-write-a-constructor-that-pa769

(Solved): can anyone sve this in c++? *Solve Given the following class definition: 6. Write a constructor that ...



can anyone sve this in c++?

Given the following class definition:
6. Write a constructor that initializes the private variables.
7. Write needed mutators
8. Write a method that prints the name of the dog, the age, and the breed.
9. Create a Dog object for a hound that is 4 years

*Solve
Given the following class definition: 6. Write a constructor that initializes the private variables. 7. Write needed mutators and accessors. 8. Write a method that prints the name of the dog, the age, and the breed. 9. Create a Dog object for a hound that is 4 years old and is named Snarky. 10.Create a pointer to a Dog object for a chihuahua that is 27 years old and is named Goliath.


We have an Answer from Expert

View Expert Answer

Expert Answer


// constructor of a class is a function with no return type and has the same name as the class Dog(string b, int a, string n) { breed = b; age = a; na
We have an Answer from Expert

Buy This Answer $5

Place Order

We Provide Services Across The Globe