Welcome, Guest. Please login or register.
Did you miss your activation email?
May 30, 2017, 12:11:40 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
Author Topic: Chapter 8 - Exercise 3 Solution (Read 2069 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:

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.