Skip to content

Instantly share code, notes, and snippets.

@abijlani
Created August 21, 2012 13:36
Show Gist options
  • Save abijlani/3415482 to your computer and use it in GitHub Desktop.
Save abijlani/3415482 to your computer and use it in GitHub Desktop.
Sample Bank Class
@interface Bank
@property (assign, nonatomic) int accountNumber;
@property (assign, nonatomic) float bankBalance;
@end
@implementation Bank
- (BOOL) enoughBalance:(float) amount {
if ( self.amount > self.bankBalance )
return NO;
else
return YES
}
- (float) makeWithdrawalWithAmount:(float) amount{
if ( [self enoughBalance:amount] )
return amount;
else
return 0.0;
}
@end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment