Changes

Jump to: navigation, search

Objective-C Inheritance

62 bytes removed, 18:45, 23 April 2012
no edit summary
-(void) displayAccountInfo
{
NSLog (@"Account Number %i ld has a balance of %f", accountNumber, accountBalance);
}
@end
-(void) displayAccountInfo
{
NSLog (@"Account Number %i ld has a balance of %f and is earning %f interest", accountNumber, accountBalance, interestRate);
}
@end
int main (int argc, const char * argv[])
{
NSAutoreleasePool * pool = [[NSAutoreleasePool alloc] init]; @autoreleasepool {
SavingsAccount *account1 = [[SavingsAccount alloc] init];
[account1 release];
[pool drain]; }  return 0;
}
</pre>

Navigation menu