Free Trial

Safari Books Online is a digital library providing on-demand subscription access to thousands of learning resources.


  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • DownloadDownload
  • PrintPrint
Share this Page URL
Help

Part I: Understanding the Objective-C La... > Making the Calculator Calculate

Hour 4. Making the Calculator Calculate

What You’ll Learn in This Hour:

  • Creating a simple calculator

  • Using mutable classes

  • Using dynamic features: protocols, categories, class methods, and objects

The first part of this hour is dedicated to making the calculator calculate. You’ll learn how to use mutable strings, strings you can change, and why Objective-C provides two mutable and immutable variants of many common data-structures. To illustrate their use, you’ll add a history of calculations to the calculator using strings. Attempting to change an immutable string generates an exception, leading to a discussion of error handling in Objective-C.


  

You are currently reading a PREVIEW of this book.

                                                                                        

Get instant access to over
$1 million worth of books and videos.

  

Start a Free Trial