Question: Design a C++ class Pet that has data members for a pets owner, pets name, pets type, and pets annual budget: 1) Use strings to
Design a C++ class Pet that has data members for a pets owner, pets name, pets type, and pets annual budget:
1) Use strings to represent a pets owner, pets name, and pets type.
2) Propose a class PetBudget to represent pets annual budget which should include the following expenses as data members: License Fee, Vet Expenses, Food, Drugs.
For simplicity, lets limit the pet type to DOG and CAT only. Assume that the number of pets by household is always 2: one dog and one cat. Write a program that
1) prompts the user to enter his/her name (i.e. pets owner), the cats name, the dogs name;
2) creates 2 instances of class Pet for the household dog and cat;
3) prompts the user for the dogs expenses by category (License Fee, Vet Expenses, Food, Drugs)
4) prompts the user for the cats expenses by category (License Fee, Vet Expenses, Food, Drugs)
5) computes and displays the total pets expenses and total expenses by category (License Fee, Vet Expenses, Food, Drugs)
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
