Welcome, Guest. Please login or register.
Did you miss your activation email?
February 23, 2017, 02:18:28 AM
Home Help Search chat Login Register 
News: Read this please.The Great Kangaroo Escape Looking for reviews of the 4th ed on Amazon!   Twitter:  @skochan

+ Official Forum for Programming in Objective-C (the iPhone Programming Language) - Stephen Kochan
|-+ Programming in Objective-C, 4th edition
| |-+ Chapter 8
| | |-+ Chapter 8 - Exercise 3 Solution
Pages: [1] Go Down
Print
Author Topic: Chapter 8 - Exercise 3 Solution (Read 1681 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:



Login with username, password and session length

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 (c) 2009 classroomM.com. All rights reserved.