Question: Create a C++ class named Dog Have the following: data: name (string) breed (string) functions getter/setter for name getter/setter for breed Create a C++ program

Create a C++ class named "Dog"

Have the following:

  • data:
    • name (string)
    • breed (string)
  • functions
    • getter/setter for name
    • getter/setter for breed

Create a C++ program (main) that uses said class:

  • Create an object from it
  • Get user input asking for a name and breed
  • Set the name/breed using the appropriate functions
  • Display it back to the user using your object functions to display that it does indeed work

Use #include "dog.h"

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!