Challenge: holding portfolio

Using the BNRStockHolding class from a previous challenge, make a tool that creates an instance of a BNRPortfolio class and fills it with stock holdings. A portfolio can tell you what its current value is.

Also, add a symbol property to BNRStockHolding that holds the stock ticker symbol as an NSString.

Figure 21.4  Create a BNRPortfolio class

Create a BNRPortfolio class

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.