Created
August 21, 2012 13:36
-
-
Save abijlani/3415482 to your computer and use it in GitHub Desktop.
Sample Bank Class
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@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