I understand the purpose of having an initializer is to set the instance variables to certain values. However, I am confused as to why you would want to have multiple initializers for each instance variable. Can’t one initializer set all the instance variables? I guess my question really is what is the practicality of having multiple initializers in a class. For instance the book has the following:
- (id)initWithItemName:(NSString *)name
return [self initWithItemName:name valueInDollars:0 serialNumber:@""];
The designated initializer already initializes the itemName, so to me, the code up above seems entirely redundant. Can somebody please clarify the purpose of having these multiple initializers.