Chapter 7. Currency Converter Tutorial
In this chapter you’ll build a single window application from beginning to end, giving you an opportunity to deepen your understanding of the Cocoa programming paradigms discussed in Chapter 6. For the first time, you’ll see the complete work flow typical of Cocoa application development:
Design the application
Create the project (Project Builder)
Create the interface (Interface Builder)
Define the classes (Interface Builder)
Implement the classes (Project Builder)
Build the project (Project Builder)
Run and test the application
The application you’ll build in this chapter is called Currency Converter—a simple utility that converts a dollar amount to an amount in another currency. Currency Converter is an extremely simple application, but there’s still a design behind it. This design is based upon the Model-View-Controller (MVC) paradigm, the model behind many designs for object-oriented programs. MVC separates an application into different types of objects, each with specific roles and responsibilities. This design paradigm aids in the development of a maintainable, extensible, and reusable code base, as the Currency Converter example will make clear.
Design the Currency Converter Application
An object-oriented application should be based on a design that identifies the objects of the application and clearly defines their roles and responsibilities. You normally work on a design before you write a line of code. You don’t need any fancy tools ...