You will be implementing an elaboration of your Pets practice assignment, let’s call it UberPets. The basic outline of the model class for Pets is:
UberPets: Name, breed, age (or DOB), gender, height, lastFed, lastClean, lastPlay.
Methods included getAge(), getName(), printPet(), feed() or clean(), and play().
Identify the controller class data and functions and the model class data members and functions.
You created the header file for the model class with one method and 3 data members, you can start with that or start over as you prefer. You might have had time to start the .cpp file for your model class like item.cpp, you will need to add to both of these.
Your task is to finish this program – complete the system you started in class. You need to finish your model class. This requires you to have a header file and .cpp for your model class. Follow the MVC design pattern to decide where each type of function should be placed. Don’t forget to test your code to make sure that it works after each new small addition!
You need to create a controller program that uses your model class, Pet. In your controller program:
1. Your controller program will need to create an array of 15 of the model class (Pet) objects.
a. Populate the data for at least 10 of the objects in the array.
i. You can provide the data for up to 4 of the objects when you declare the array.
ii. You may use the single object for one more object of the array.
iii. Use console input to populate the rest of the 10 with data and put them in the array.
2. Your controller program should have a menu that allows the user to pick from the following items.
a. Add a Pet
b. Print all pet’s data
c. Clean the pets
d. Play with the pets
e. Feed the pets
3. Add a Pet should allow the user to create one object of the model class and give it data.
4. Your controller program should print the inventory. You should use a printAll() function in the controller class that uses the printPet() method in the Pets class to format each pet’s data for printing to the console. printAll() should print each pet in the array to the console.
You should pass the array by reference using a pointer or the name of the array and an int to show how many pets are in the array to printAll(). Your model class, Pet:
5. Your model class, Pet, should have a no argument (default) constructor and a constructor with a parameter for each attribute.
6. Your class should have the two getters shown above and a printPet() function that formats the data from the object and returns it in a string.
7. Your class should have at least the three additional methods above that do some work.
8. The methods feed(), clean() and play() should update the lastFed, lastClean and lastPlay data members with the current date/time. Also, a message should appear on the console saying the pet was fed with their name.
9. Challenge: You can use ASCII characters to make a message that is a small illustration of a pet. You will get no more than one or two bonus points for this. See details below.
10. Don’t forget to follow the style guide.
a. Write clear and informative prompts and welcome/end of program output.
b. Make sure you have good comments especially your block comments.
c. Make sure your array printout has headers showing what each field is and make the data line up and look nice. You should use some of the format modifiers from the iomanip library to do this.
Looking for a Challenge? You can use ASCII characters to make a message that is a small illustration of a pet taking a walk or just as a static image as part of your printPet() function.
Here are some sources, there are many more online https://en.wikipedia.org/wiki/ASCII_art and https://www.pcmag.com/feature/342727/7-classic-pc-games-with-ascii-graphics on how to use ASCII to draw animals or make graphics games. Do not make this your life’s work, it is purely for fun! You will get no more than one or two bonus points for this.
1 bonus point for adding a pet specific illustration to the printPet() function.
2 bonus points for adding a moving graphic of a pet to one of the action items: feed(), or play().
All images and illustrations must be E for Everyone rated by me.
3 Testing and Output.
In additional to doing everything right, test your program by doing the following:
• Exit before you add any objects via console.
• Make some errors in input.
• Make no errors in your input.
• Exit before you test each function.
• You should take user input and add a new object of the model class to the next open slot in your array and print it again.
• Your program test plan and tests should use all the methods in your model class at least once.
• Your test plan should make sure each line of code and all options are tested.
• When related to console input, send correct and incorrect arguments to each function that has arguments.
• Make sure program ends gracefully for all situations.
4 Folder you submit
1. compress the folder (.zip):
2. The header file (.hpp) and source code(.cpp) for your model class.
3. The .cpp source code for your controller class.
4. The console output for all your test runs, clearly labeled in a .txt file.
5. Compress the folder using ZIP, not another compression type.