Create a new Xcode command-line project. Name the project Assignment-23-1.
Make sure that you write this project to prevent memory leaks and retain cycles.
The Kennel Class
Create an Objective-C class named Kennel. The Kennel class will have the follow features.
A string for the name of the kennel.
An NSMutableArray to hold pets that are staying at the kennel.
A method to add a new pet to the kennel. This will add the pet to the array of pets and add the kennel to the pet’s kennel property.
A method to calculate how much food the kennel will need for the week.
Override the description method to create a weekly report for the kennel. The report should contain a list all the pets and how much of what food they need. After the list of pets, append the total amount of food needed for the week. Create the full report as a string and return it.
The Pet Class
Create an Objective-C class named Pet that will be the base class for all pets. This class will have these features.
A string property for the name of the pet.
A float property for the weight of the pet.
A float property for the amount of food the pet needs for a week.
A string property for the type of food the pet needs.
A Kennel property that will hold a pointer to the kennel where the pet is staying.
The Dog Class
Create a subclass of the Pet class named Dog. The class will add these features to the base class.
A string property for the breed of the dog.
A description method override that returns a string for the dog like this:
The SmallDog Class
Create a subclass of the Dog class named SmallDog. This class will add these features to its base classes.
A description method override that returns a string like this. You must get the string from the superclass description method and just add the text, "Small " at the beginning.
The Cat Class
Create a subclass of the Pet class named Cat. The class will add these features to the base class.
A string property for the length of the cat’s fur. It will hold information like, “Long Haired”, or “Short Haired”.
A description method override that returns a string like this:
In the main function.
Perform all the following tasks in the main function.
Import all the classes you have created.
Create an instance of the Kennel class.
Create several instances each of the Dog, SmallDog, and Cat classes.
Assign appropriate values to the properties of the instances.
Add the pet instances to the kennel using the method in the Kennel class.
Output the Kennel report with just the following line of code.