Challenge: top holdings

This challenge and the next one build on the challenge from Chapter 22. Add a method to the BNRPortfolio class that returns an NSArray of only the top three most valuable holdings, sorted by current value in dollars. Test it in main().

Get Objective-C Programming: The Big Nerd Ranch 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.