// ABox.h
@interface ABox : NSObject
@property (nonatomic, copy) NSString *name;
@property float length;
@property float width;
@property float height;
- (float) computeVolume;
- (NSString *) estimateCategory;
@end
// ABox.m
@implementation ABox
@synthesize name, length, width, height;
- (float) computeVolume {
return self.length * self.width * self.height;
}
- (NSString *) estimateCategory {
float vol = [self computeVolume];
if(vol >= 8000)
return @"Large";
else if((vol < 8000) && (vol > 1000))
return @"Medium";
else
return @"Small";
}
2 errors not sure why
Undefined symbols for architecture x86_64: "_main", referenced from: -u command line option ld: symbol(s) not found for architecture x86_64 clang: error: linker command failed with exit code 1 (use -v to see invocation)

New Topic/Question
Reply


MultiQuote




|