## Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

### Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

# import <Foundation/Foundation.h>

@interface calculateTip : NSObject

@property (nonatomic) float subtotal;

• (void)multiply;

@end

# import "calculateTip.h"

@implementation calculateTip

• (void)multiply{

self.subtotal = self.subtotal * 0.2;

}

@end

# import "calculateTip.h"

calculateTip *result = [[calculateTip alloc]init]; [result multiply];

variable_assignment.mm
```#calculate.h
#import <Foundation/Foundation.h>

@interface calculateTip : NSObject

@property (nonatomic) float subtotal;

- (void)multiply;

@end

#calculate.m
#import "calculateTip.h"

@implementation calculateTip

- (void)multiply{

self.subtotal = self.subtotal * 0.2;

}

@end

#main.m
#import <Foundation/Foundation.h>
#import "calculateTip.h"
calculateTip *result = [[calculateTip alloc]init];
[result multiply];
```

Hi there,

You need to specify the return type as float not as void.

```-(float) calculateTip: (float) subtotal {
return subtotal * .2;
}
```

Then you need to copy the method signature into the interface/header file to be able to use it on other files like this.

```-(float) calculateTip: (float) subtotal;
```