My Challenge Solution


#1

Header File:

//  StockHolding.h
//  Stocks
//
//  Created by DuBois McMillan on 12/19/11.
//  Copyright (c) 2011 __MyCompanyName__. All rights reserved.
//

#import <Foundation/Foundation.h>

@interface StockHolding : NSObject

{
    //variables for the Stockholding object
    float purchaseSharePrice;
    float currentSharePrice;
    int numberOfShares;
}
 
//declare getter/setter methods for the Stockholding object
@property float purchaseSharePrice;
@property float currentSharePrice;
@property int numberOfShares;

//declare additional methods 
-(float)costInDollars;// purchaseShare * numberOfShares
-(float)valueInDollars;// currentSharePrice * numberOfShares
-(int)numberOfShares;//Number of shares purchased


@end