Data hosted with ♥ by Pastebin.com - Download Raw - See Original
  1. #import <Foundation/Foundation.h>
  2. #import "Person.h"
  3.  
  4. int main (int argc, const char * argv[])
  5. {
  6.  
  7.     @autoreleasepool {
  8.        
  9.         NSLog(@"Hello, World!");
  10.        
  11.         Person *person = [[Person alloc] init];
  12.        
  13.         [person setWeightInKilos:145];
  14.         [person setHeightInMeters:1.8];
  15.        
  16.         float bmi = [person bodyMassIndex];
  17.         NSLog(@"person has a BMI of %f", bmi);
  18.        
  19.         NSLog(@"person (%d, %f) has a BMI of %f", [person weightInKilos], [person heightInMeters], bmi);
  20.        
  21.        
  22.     }
  23.     return 0;
  24. }
  25.