Swift Programming: The Big Nerd Ranch Guide (Big Nerd Ranch Guides) by Mathias Matthew & Gallagher John

Swift Programming: The Big Nerd Ranch Guide (Big Nerd Ranch Guides) by Mathias Matthew & Gallagher John

Author:Mathias,Matthew & Gallagher,John
Language: eng
Format: mobi
Tags: Big Nerd Ranch Guides, Swift Programming, Xcode, iPad Programming, Mac Programming, COM051370, iPhone Programming, iOS Programming
ISBN: 9780134689654
Publisher: Big Nerd Ranch Guides
Published: 2016-11-22T23:00:00+00:00


If the subclass implements all of its superclass’s designated initializers – either explicitly or via inheritance – it will inherit all of its superclass’s convenience initializers.

Your Zombie type falls within the first of these two scenarios. It is inheriting the Monster type’s sole designated initializer because it provides default values for all new properties it adds and it does not define its own designated initializer. And because the Zombie type is inheriting an initializer, the compiler is no longer providing the free empty initializer you were using before.

The signature for the initializer Zombie inherits is init(town:monsterName:), with parameters for town and monsterName. Update fredTheZombie’s initialization to include these parameters and remove the error.



Download



Copyright Disclaimer:
This site does not store any files on its server. We only index and link to content provided by other sites. Please contact the content providers to delete copyright contents if any and email us, we'll remove relevant links or contents immediately.