Well, this is really choob and newbish

The fact is that i started to learn Objective-C tonight. Basic stuff, Classes, etc,etc...
Just finished by now my first full program from what i have been reading, it's in fact a calculator, really simple stuff (+,-,*,/) , normally the first program we make when we are learning a language.
Plus, I'm learning this to be able to code for Apple stuff. (as i do own a macbook, an ipod, etc).
I know there are already a few coders that know this language well i guess, so hints and critics are always welcome
So, i just want to share what i have done so far.
Code:
//
// main.m
// Started
//
// Created by Bruno Monteiro on 10/06/13. (Aka Brinuz)
//
#import <Cocoa/Cocoa.h>
@interface Calculator : NSObject
{
int num1;
int num2;
}
-(void) askNums;
-(void) doAddition;
-(void) doSubtraction;
-(void) doMultiplication;
-(void) doDivision;
@end
@implementation Calculator
-(void) askNums {
NSLog(@"First Number:");
do {
scanf("%d",&num1);
} while (num1 == 0); //Don't want it to be 0
NSLog(@"Last Number:");
do {
scanf("%d",&num2);
} while (num2 == 0); //Don't want it to be 0
}
-(void) doAddition {
NSLog(@"Result: %d", num1 + num2);
NSLog(@"\n\n");
}
-(void) doSubtraction {
NSLog(@"Result: %d", num1 - num2);
NSLog(@"\n\n");
}
-(void) doMultiplication {
NSLog(@"Result: %d", num1 * num2);
NSLog(@"\n\n");
}
-(void) doDivision {
NSLog(@"Result: %d", num1 / num2);
NSLog(@"\n\n");
}
@end
int menu();
int main(int argc, char *argv[])
{
Calculator *calc = [[Calculator alloc] init];
int option;
do
{
option = menu();
if(option == 0)
{
NSLog(@"Will Exit...");
return 0;
}
[calc askNums];
switch (option) {
case 1:
[calc doAddition];
break;
case 2:
[calc doSubtraction];
break;
case 3:
[calc doMultiplication];
break;
case 4:
[calc doDivision];
break;
}
}
while (option != 0);
return 0;
}
int menu()
{
NSLog(@"Option:");
NSLog(@"1- Add. \n");
NSLog(@"2- Sub. \n");
NSLog(@"3- Multi. \n");
NSLog(@"4- Div. \n");
NSLog(@"0- Exit");
int option = 0;
do {
NSLog(@"Choose Option:");
scanf("%d",&option);
} while(option < 0 || option > 4);
return option;
}
Well, i would give an explanation on what is being done, but since I'm too fresh i don't want to say stupid things ^^
Edit:
Credits to this for showing me how HelloWorld works:
http://guides.macrumors.com/Compilin...ld_application