Question: Introduction to Objects Lab: Objects Lab Challenge ( 4 ) Create the variable dog 1 , and instantiate it as an object of the Dog
Introduction to Objects Lab: Objects
Lab Challenge
Create the variable dog and instantiate it as an object of the Dog class. This dog's name is Marceline and she is a German Shepherd. Create the variable dog and make it a copy of dog dog should be named Cajun and have the breed Belgian Malinois.
Your goal for this assignment is to design the class Dog so that the above can be implemented successfully.
Expected Output
Test your code by printing the name and breed of each dog to make sure they fulfill the requirements above. Most importantly, the third print statement will print false.
Marceline German Shepherd
Cajun Belgian Malinois
false
DO NOT CHANGE the existing code in main
Dog dogMarceline "German Shepherd";
Dog dogdog;
dog name "Cajun";
dogbreed "Belgian Malinois";
cout
dogname dog breed end l
cout dog name dog breed endl
if dog name dog name && dog breed dog breed
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
