Hi all.. Just done exercise 2 which should have been an easy one but seemed to have taken a while

This is my first attempt
#import <Foundation/Foundation.h>
int main (int argc, const char * argv[]) {
NSAutoreleasePool * pool = [[NSAutoreleasePool alloc] init];
float a = 27;
float b = 32;
float celsius;
celsius = (a - b)/1.8; // convertion
NSLog (@"The temperature degrees F is: %f ", celsius);
[pool drain];
return 0;
}
Ok this is keeping it simple and when I looked here on the forum I got the feeling I was missing the point of the exercise some what. So I started it again.. Have to say I struggled a little with it and I am not sure if I am not getting the Classes, Methods thing and getting it all messed up. After struggling on a little I came back to the forum to look at what others had done and to see where I was going wrong. where I was struggling a little was the Interface section and Implementation section. Think I might need to go back and read up on thoes 2 again..
If anyone can offer some advice/help on my program I would be very greatful
Thanks in advance
John
This is my code now
#import <Foundation/Foundation.h>
// Interface Section
@interface Tempconverter: NSObject
{
float Celsius;
float Fahrenheit;
}
-(float) Celsius;
-(float) Fahrenheit;
-(void) setFahrenheit: (float) f;
-(void) calculateCelsius;
@end
// implementation section
@implementation Tempconverter
-(float) Fahrenheit
{
return Fahrenheit;
}
-(void) setFahrenheit: (float) f
{
Fahrenheit = f;
}
-(void) calculateCelsius
{
Celsius = (Fahrenheit - 32)/1.8;
}
-(float) Celsius
{
return Celsius;
}
@end
// Program Section
int main (int argc, const char * argv[]) {
NSAutoreleasePool * pool = [[NSAutoreleasePool alloc] init];
Tempconverter *mytempconvert =[[Tempconverter alloc] init];
[mytempconvert setFahrenheit: 27];
[mytempconvert calculateCelsius];
NSLog(@"Temp convertion =:%f", [mytempconvert Celsius]);
[mytempconvert release];
[pool drain];
return 0;
}