Permalink
Browse files

Initial commit

  • Loading branch information...
0 parents commit 6b4066672b4a3f0e785b3a672668bed11b4d2519 Sabyrzhan Tynybayev committed Jul 10, 2012
Binary file not shown.

Large diffs are not rendered by default.

Oops, something went wrong.
@@ -0,0 +1,15 @@
+#include "Person.h"
+
+int main (int argc, const char * argv[])
+{
+ NSAutoreleasePool * pool = [[NSAutoreleasePool alloc] init];
+ Person *person = [[Person alloc] init];
+ [person setName: @"Sabyrzhan"];
+ [person setSurname: @"Tynybayev"];
+
+
+ NSLog (@"Person full name is %@ %@", [person getName], [person getSurname]);
+ [pool drain];
+
+ return 0;
+}
@@ -0,0 +1,12 @@
+#import <Foundation/Foundation.h>
+
+@interface Person : NSObject {
+ NSString* name;
+ NSString* surname;
+}
+
+-(NSString*) getName;
+-(void) setName: (NSString*) name;
+-(NSString*) getSurname;
+-(void) setSurname: (NSString*) surname;
+@end
@@ -0,0 +1,20 @@
+#include "Person.h"
+
+@implementation Person
+-(NSString*) getName {
+ return name;
+}
+
+-(void) setName: (NSString*) n {
+ name = n;
+}
+
+
+-(NSString*) getSurname {
+ return surname;
+}
+
+-(void) setSurname: (NSString*) s {
+ surname = s;
+}
+@end
Binary file not shown.
Oops, something went wrong.

0 comments on commit 6b40666

Please sign in to comment.