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
  • PrintPrint
Share this Page URL
Help

Chapter 7. More on Classes > Operations on Fractions

Operations on Fractions

Let's continue to work with the Fraction class. First, you'll write a method that will enable you to add one fraction to another. You'll name the method add:, and you have it take a fraction as an argument. Here's the declaration for the new method:

90

-(void) add: (Fraction *) f;


  

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


  
  • Safari Books Online
  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint