New

Long-Term Learning

Learn efficiently and remember over time.

Start Long-Term Learning

Get personalized study reminders at intervals optimized for better retention.
Track your progress on this set by creating a folder
Or add to an existing folder

Add this set to a folder

  • The class that has no parent is at the top of the hierarchy and called the root class.

    Note

    You should take advantage of existing classes to use as your root class. NSObject is a common root class.

    Fraction: NSObject

    Fraction is the child or subclass.

    subclass

    child class

    superclass

    parent class

    Whenever a new class is defined it inherits certain things from the superclass including all non-private methods and instance variables.

    Instance variables that are accessed directly by a subclass must be declared in the interface section, and not in the implementation section. Instance variables declared or synthesized in the implementation section are PRIVATE instance variables and are not directly accessible by subclasses.

    sub-sub class

    grandchild

    alloc and init are inherited methods from NSObject

    Note

    Rules to choose a message (method) to apply to an object

    First, the class to which the object belongs is checked. Then the parent class, and then the next parent class, and so on. If you don't find the method a warning message is generated.

    Inheritance often is used to extend a class

    Note

    Please allow access to your computer’s microphone to use Voice Recording.

    Having trouble? Click here for help.

    We can’t access your microphone!

    Click the icon above to update your browser permissions above and try again

    Example:

    Reload the page to try again!

    Reload

    Press Cmd-0 to reset your zoom

    Press Ctrl-0 to reset your zoom

    It looks like your browser might be zoomed in or out. Your browser needs to be zoomed to a normal size to record audio.

    Please upgrade Flash or install Chrome
    to use Voice Recording.

    For more help, see our troubleshooting page.

    Your microphone is muted

    For help fixing this issue, see this FAQ.

    Star this term

    You can study starred terms together

    NEW! Voice Recording

    This is a Plus feature