Question: Write a complete the most simplistic C++ program that creates a Daggo class and uses objects of this class. As the class name implies, this
Write a complete the most simplistic C++ program that creates a Daggo class and uses objects of this class. As the class name implies, this represents a dog. The Daggo class consists of following components.
Properties (assuming default access modifier)
name: string, name of the dog
color: string, color of the dog
weight: double
height: double
Constructors:
No-argument constructor: the constructor has no parameter
Standard constructor: the constructor with the same number of parameters as properties.
Methods
bark(): no return, i.e. void return type, describe how the dog bark, what does it sound like.
fetch(item): no return, describe how the dog retrieves this item.
display(): no return, prints the name and current value of every property.
The main() function should be placed below the Daggo class, inside the same source file as the Daggo class. In the main() function, create two Daggo objects, one from the no-argument constructor, another from the standard constructor. For the latter object from the standard constructor, one value should be read from the user with proper prompts. At the end, call every method from each object.
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
