Question: Write a program in C++ (Object oriented design). The program should have a class called Dog that has the attributes: Name, Age, and Breed and
Write a program in C++ (Object oriented design). The program should have a class called Dog that has the attributes: Name, Age, and Breed and a constructor to set these values and a method to print these values. Write a main program that creates an array of 4 Dog objects and prints them out. After that write the same program from the first part of question, using an array of structs (procedural design). The struct will have fields for Age, Breed and Name.
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
