Exercises

  1. The setRadix: method has gotten unwieldy. Split the functionality into two or more methods. Justify your decisions about how you decided to break up the logic. Is it possible to split up this method in such a way that you use fewer lines of code with two methods than with one?

  2. Add another base to the Calculator.

  3. Add a second display to the Calculator so that it will display both hexadecimal and decimal numbers at the same time.

Get Building Cocoa Applications: A Step by Step Guide now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.