/ ObjectiveCTest2 // // Created by UEC on 30/12/15. // Copyright (c) 2015¦~ uec. All rights reserved. // #import #import "BankAccount.h" int main(int argc, const char * argv[]) { @autoreleasepool { // insert code here... NSLog(@"Bank Account Testing"); // Create a new BankAccount Object based on BankAccount Class // Below is a detailed step sequence // Step 1: Create BankAccount pointer variable BankAccount *b1; // Step 2: Allocate memory to the variable // [ObjectName MethodName] b1 = [BankAccount alloc]; // Step 3: Init the variable b1 = [b1 init]; [b1 setAccountNumber:934993943]; int b1_acctNumber = [b1 getAccountNumber]; double b1_acctAmt = [b1 getAccountAmt]; NSLog(@"b1 Acct Number is %i",b1_acctNumber); NSLog(@"b1 Acct Amount is %f",b1_acctAmt); /////////////////////////////////////////// BankAccount *b2 = [[BankAccount alloc]init]; [b2 setAccountNumber:834343433 withAmount:1000.0]; NSLog(@"b2 Acct Number is %i and Amount is %f",[b2 getAccountNumber],[b2 getAccountAmt]); } return 0; }