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:

  1. Design the application

  2. Create the project (Project Builder)

  3. Create the interface (Interface Builder)

  4. Define the classes (Interface Builder)

  5. Implement the classes (Project Builder)

  6. Build the project (Project Builder)

  7. 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 ...

Get Learning Cocoa now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.