Official Forum for Programming in Objective-C (the iPhone Programming Language) - Stephen Kochan
March 24, 2018, 06:39:12 AM *
Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
   Home   Help Search Login Register Chat  
Pages: [1]   Go Down
Author Topic: Chapter 8 - Exercise 3 Solution  (Read 3403 times)
Posts: 45

« on: October 20, 2013, 11:59:34 AM »

Q: What can you say about the relationship between ClassB and ClassB2?

A: They are individual classes, while both are subclasses to ClassA, or both have the same superclass, they have no relation between each other.

Q: Identify the hierarchical relationship the NSObject class, ClassA, ClassB and ClassB2

                                        NSObject   (rootclass )
                                         ClassA      (superclass to ClassB and B2, and subclass to NSObject)
                                        /         \
                               ClassB          ClassB2      (ClassB and ClassB2 are subclasses of ClassA);

Q: What is the superclass of ClassB?

A: The superclass of ClassB is ClassA and NSObject.

Q: What is the superclass of ClassB2?

A: The superclass of ClassB2 is also ClassA and NSObject.

Q: How many subclasses can a Class have, and how many superclasses can it have?

A: As many as your memory capacity allows, thousands, millions even trillions. (Needs confirmation)
Posts: 10

« Reply #1 on: June 11, 2016, 07:21:25 PM »

I think limited superclass can a class have when the superclass reaches the rootclass.
Pages: [1]   Go Up
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.11 | SMF © 2006-2009, Simple Machines LLC Valid XHTML 1.0! Valid CSS!
Entire forum contents ゥ 2009 All rights reserved.