Official Forum for Programming in Objective-C (the iPhone Programming Language) - Stephen Kochan
July 21, 2017, 01:54:53 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
  Print  
Author Topic: Chapter 8 - Exercise 3 Solution  (Read 2240 times)
bertobettencourt
Newbie
*
Posts: 45


Email
« 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

A:    
              
          
                                        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)
Logged
cary_W
Newbie
*
Posts: 10


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

I think limited superclass can a class have when the superclass reaches the rootclass.
Logged
Pages: [1]   Go Up
  Print  
 
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 classroomM.com. All rights reserved.