1. Run the SimpleTest program that simply creates a CatManager instance and then prints out Done!. You...
Question:
1. Run the SimpleTest program that simply creates a CatManager instance and then prints out "Done!". You will notice that the program fails. You need to add something to the constructor in CatManager to fix the problem. What did you need to add?
2. Fill in the methods that are missing code in CatManager. These are currently commented out so you will need to uncomment them. Run Lab1Driver to test your code. You will need to uncomment code there too.
3. In the current version of Lab1Driver, the CatMgr.add method is not being tested. Add code that creates a Cat object and adds it to the CatMgr object in Lab1Driver. Put it AFTER the code that prints out the number of tabby and spotted cats, and BEFORE the code that asks for a name of a cat to search for. Test your code by searching for the name of the cat you added to the CatMgr.
4. If you wanted to change the CatMgr.add method so that there can never be two cats with the same name on the list, what would you do? You don't have to actually implement this - just write down your idea.
PICS FOR THE CODE ARE -
Introduction To Programming With Java A Problem Solving Approach
ISBN: 9781260575248
3rd International Edition
Authors: John Dean