{"action":"created","comment":{"url":"https://api.github.com/repos/learn-co-curriculum/object-oriented-people/pulls/comments/37996204","id":37996204,"diff_hunk":"@@ -1,132 +1,184 @@\n----\n-tags: OOP, properties, methods\n-language: objc\n----\n+# Object Oriented People\n \n-## Learning Goals\n-  1. Learn how Objects work\n-  2. Get better with Objective-C\n+## Objectives\n \n-## Requirements\n-  1. Create a new Person Class.  Person should be an NSObject subclass.  \n-  2. Add all of the required properties to the Person class \n-  3. Implement all of the required methods in the Person class \n+1. Create a new class that contains read-only properties.\n+2. Write a designated initializer, default initializer, and convenience initializer to set initial values for the properties of an instance of that class.\n+3. Write public methods that provide a controlled interface with the read-only properties.\n+ \n+## Instructions\n \n-### Person\n+Fork and clone this lab. \n \n-#### About Properties\n-Properties provide a way to create instance variables and accessor methods (getters and setters) in a single step.  Say for instance we created a class called cats.  If Cats has a property (of type NSNumber) numberOfLegs, the cat class will automatically, behind the scenes generate two methods for us: \n+Open the `object-oriented-people.xcworkspace` file. \n \n-```objc \n+### I. Create the Class Files\n \n- - (NSNumber *)numberOfLegs; // getter\n- - (void)setNumberOfLegs:(NSNumber *)numberOfLegs; // setter\n+Create a new class called `FISPerson` that inherits from `NSObject`.\n \n-```\n+#### Declare the Properties\n+\n+Publicly declare four properties as `readonly` properties:\n+\n+  * An `NSString` property called `name`,\n+  * An `NSUInteger` property called `age`,\n+  * An `NSMutableArray` property called `skills`, and\n+  * A `BOOL` property called `qualifiedTutor`.\n \n-We can use these methods to both set and get our class's properties.  Let's say we create a Cat 'myCat' in our AppDelegates' didFinishLaunchingWithOptions method.  We can set the cats number of legs and get the cats number of legs using the following code.  \n+**Top-tip:** *Remember that primitive-type properties cannot accept a retention attribute (*`strong`/`retain` *or* `weak`*).*\n+\n+Insert the private `@interface` section below the `#import` statements of the `.m` implementation file:\n \n ```objc\n+//  FISPerson.m\n \n- - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions\n- {\n-   Cat *myCat = [[Cat alloc] init];\n-  \n-   [myCat setNumberOfLegs:@4]; //sets number of legs \n-   NSNumber *numLegs = [myCat numberOfLegs]; // gets myCat's numberOfLegs and assigns it to a local variable 'numLegs'\n- }\n+#import \"FISPerson.h\"\n \n-```\n+@interface FISPerson ()\n \n-But it gets better! Objective-C allows us to use dot notation to both get and set properties.  I could (and in fact should), write the above code like this: \n+@end\n \n-```objc\n- - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions\n- {\n-   Cat *myCat = [[Cat alloc] init];\n-  \n-   myCat.numberOfLegs = @4; //sets number of legs \n-   NSNumber *numLegs = myCat.numberOfLegs; // gets myCat's numberOfLegs and assigns it to a local variable 'numLegs'\n- }\n+@implementation\n+\n+@end\n ```\n \n-Last, remember that the classes you make are just like any other class such as `NSString` or `NSNumber`. You can add them to arrays like this:\n+**Top-tip:** *Don't forget to include the empty parenthesis that conclude the private* `@interface` *section.*\n \n-```\n-NSMutableArray *myArray = [[NSMutableArray alloc] init];\n-Cat *myCat = [[Cat alloc] init];\n+Now privately redeclare all four properties as `readwrite` within the private `@interface` section.\n \n-[myArray addObject:myCat];\n-```\n+#### Declare the Methods\n+\n+Publicly declare the ten following methods in the `.h` header file:\n \n-Then we can get the cats the same way we are used to with arrays\n+  * `init` — the default initializer,\n+  * `initWithName:age:` — a convenience initializer,\n+  * `initWithName:age:skills:qualifiedTutor:` — a designated initializer,\n \n+  * `celebrateBirthday` which returns an `NSString`,\n+\n+  * `learnSkillBash` which returns `void`,\n+  * `learnSkillXcode` which returns `void`,\n+  * `learnSkillObjectiveC` which returns `void`,\n+  * `learnSkillObjectOrientedProgramming` which returns `void`,\n+  * `learnSkillInterfaceBuilder` which returns `void`, and\n+\n+  * `qualifyAsTutor` which returns a `BOOL`.","path":"README.md","position":109,"original_position":109,"commit_id":"c16b66daae992e02b73dc61a93d1f2c8b127d8df","original_commit_id":"c16b66daae992e02b73dc61a93d1f2c8b127d8df","user":{"login":"misterfifths","id":1193940,"avatar_url":"https://avatars.githubusercontent.com/u/1193940?v=3","gravatar_id":"","url":"https://api.github.com/users/misterfifths","html_url":"https://github.com/misterfifths","followers_url":"https://api.github.com/users/misterfifths/followers","following_url":"https://api.github.com/users/misterfifths/following{/other_user}","gists_url":"https://api.github.com/users/misterfifths/gists{/gist_id}","starred_url":"https://api.github.com/users/misterfifths/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/misterfifths/subscriptions","organizations_url":"https://api.github.com/users/misterfifths/orgs","repos_url":"https://api.github.com/users/misterfifths/repos","events_url":"https://api.github.com/users/misterfifths/events{/privacy}","received_events_url":"https://api.github.com/users/misterfifths/received_events","type":"User","site_admin":false},"body":"`qualifiesAsTutor`","created_at":"2015-08-26T15:30:22Z","updated_at":"2015-08-26T15:30:22Z","html_url":"https://github.com/learn-co-curriculum/object-oriented-people/pull/9#discussion_r37996204","pull_request_url":"https://api.github.com/repos/learn-co-curriculum/object-oriented-people/pulls/9","_links":{"self":{"href":"https://api.github.com/repos/learn-co-curriculum/object-oriented-people/pulls/comments/37996204"},"html":{"href":"https://github.com/learn-co-curriculum/object-oriented-people/pull/9#discussion_r37996204"},"pull_request":{"href":"https://api.github.com/repos/learn-co-curriculum/object-oriented-people/pulls/9"}}},"pull_request":{"url":"https://api.github.com/repos/learn-co-curriculum/object-oriented-people/pulls/9","id":43285372,"html_url":"https://github.com/learn-co-curriculum/object-oriented-people/pull/9","diff_url":"https://github.com/learn-co-curriculum/object-oriented-people/pull/9.diff","patch_url":"https://github.com/learn-co-curriculum/object-oriented-people/pull/9.patch","issue_url":"https://api.github.com/repos/learn-co-curriculum/object-oriented-people/issues/9","number":9,"state":"open","locked":false,"title":"revision","user":{"login":"markedwardmurray","id":10505365,"avatar_url":"https://avatars.githubusercontent.com/u/10505365?v=3","gravatar_id":"","url":"https://api.github.com/users/markedwardmurray","html_url":"https://github.com/markedwardmurray","followers_url":"https://api.github.com/users/markedwardmurray/followers","following_url":"https://api.github.com/users/markedwardmurray/following{/other_user}","gists_url":"https://api.github.com/users/markedwardmurray/gists{/gist_id}","starred_url":"https://api.github.com/users/markedwardmurray/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/markedwardmurray/subscriptions","organizations_url":"https://api.github.com/users/markedwardmurray/orgs","repos_url":"https://api.github.com/users/markedwardmurray/repos","events_url":"https://api.github.com/users/markedwardmurray/events{/privacy}","received_events_url":"https://api.github.com/users/markedwardmurray/received_events","type":"User","site_admin":false},"body":"@jmburges ","created_at":"2015-08-25T13:28:48Z","updated_at":"2015-08-26T15:30:22Z","closed_at":null,"merged_at":null,"merge_commit_sha":"31369d83217caaa9a454483ceea95d846dbc6667","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/learn-co-curriculum/object-oriented-people/pulls/9/commits","review_comments_url":"https://api.github.com/repos/learn-co-curriculum/object-oriented-people/pulls/9/comments","review_comment_url":"https://api.github.com/repos/learn-co-curriculum/object-oriented-people/pulls/comments{/number}","comments_url":"https://api.github.com/repos/learn-co-curriculum/object-oriented-people/issues/9/comments","statuses_url":"https://api.github.com/repos/learn-co-curriculum/object-oriented-people/statuses/c16b66daae992e02b73dc61a93d1f2c8b127d8df","head":{"label":"learn-co-curriculum:wip-revision","ref":"wip-revision","sha":"c16b66daae992e02b73dc61a93d1f2c8b127d8df","user":{"login":"learn-co-curriculum","id":6208017,"avatar_url":"https://avatars.githubusercontent.com/u/6208017?v=3","gravatar_id":"","url":"https://api.github.com/users/learn-co-curriculum","html_url":"https://github.com/learn-co-curriculum","followers_url":"https://api.github.com/users/learn-co-curriculum/followers","following_url":"https://api.github.com/users/learn-co-curriculum/following{/other_user}","gists_url":"https://api.github.com/users/learn-co-curriculum/gists{/gist_id}","starred_url":"https://api.github.com/users/learn-co-curriculum/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/learn-co-curriculum/subscriptions","organizations_url":"https://api.github.com/users/learn-co-curriculum/orgs","repos_url":"https://api.github.com/users/learn-co-curriculum/repos","events_url":"https://api.github.com/users/learn-co-curriculum/events{/privacy}","received_events_url":"https://api.github.com/users/learn-co-curriculum/received_events","type":"Organization","site_admin":false},"repo":{"id":16624543,"name":"object-oriented-people","full_name":"learn-co-curriculum/object-oriented-people","owner":{"login":"learn-co-curriculum","id":6208017,"avatar_url":"https://avatars.githubusercontent.com/u/6208017?v=3","gravatar_id":"","url":"https://api.github.com/users/learn-co-curriculum","html_url":"https://github.com/learn-co-curriculum","followers_url":"https://api.github.com/users/learn-co-curriculum/followers","following_url":"https://api.github.com/users/learn-co-curriculum/following{/other_user}","gists_url":"https://api.github.com/users/learn-co-curriculum/gists{/gist_id}","starred_url":"https://api.github.com/users/learn-co-curriculum/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/learn-co-curriculum/subscriptions","organizations_url":"https://api.github.com/users/learn-co-curriculum/orgs","repos_url":"https://api.github.com/users/learn-co-curriculum/repos","events_url":"https://api.github.com/users/learn-co-curriculum/events{/privacy}","received_events_url":"https://api.github.com/users/learn-co-curriculum/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/learn-co-curriculum/object-oriented-people","description":"","fork":false,"url":"https://api.github.com/repos/learn-co-curriculum/object-oriented-people","forks_url":"https://api.github.com/repos/learn-co-curriculum/object-oriented-people/forks","keys_url":"https://api.github.com/repos/learn-co-curriculum/object-oriented-people/keys{/key_id}","collaborators_url":"https://api.github.com/repos/learn-co-curriculum/object-oriented-people/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/learn-co-curriculum/object-oriented-people/teams","hooks_url":"https://api.github.com/repos/learn-co-curriculum/object-oriented-people/hooks","issue_events_url":"https://api.github.com/repos/learn-co-curriculum/object-oriented-people/issues/events{/number}","events_url":"https://api.github.com/repos/learn-co-curriculum/object-oriented-people/events","assignees_url":"https://api.github.com/repos/learn-co-curriculum/object-oriented-people/assignees{/user}","branches_url":"https://api.github.com/repos/learn-co-curriculum/object-oriented-people/branches{/branch}","tags_url":"https://api.github.com/repos/learn-co-curriculum/object-oriented-people/tags","blobs_url":"https://api.github.com/repos/learn-co-curriculum/object-oriented-people/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/learn-co-curriculum/object-oriented-people/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/learn-co-curriculum/object-oriented-people/git/refs{/sha}","trees_url":"https://api.github.com/repos/learn-co-curriculum/object-oriented-people/git/trees{/sha}","statuses_url":"https://api.github.com/repos/learn-co-curriculum/object-oriented-people/statuses/{sha}","languages_url":"https://api.github.com/repos/learn-co-curriculum/object-oriented-people/languages","stargazers_url":"https://api.github.com/repos/learn-co-curriculum/object-oriented-people/stargazers","contributors_url":"https://api.github.com/repos/learn-co-curriculum/object-oriented-people/contributors","subscribers_url":"https://api.github.com/repos/learn-co-curriculum/object-oriented-people/subscribers","subscription_url":"https://api.github.com/repos/learn-co-curriculum/object-oriented-people/subscription","commits_url":"https://api.github.com/repos/learn-co-curriculum/object-oriented-people/commits{/sha}","git_commits_url":"https://api.github.com/repos/learn-co-curriculum/object-oriented-people/git/commits{/sha}","comments_url":"https://api.github.com/repos/learn-co-curriculum/object-oriented-people/comments{/number}","issue_comment_url":"https://api.github.com/repos/learn-co-curriculum/object-oriented-people/issues/comments{/number}","contents_url":"https://api.github.com/repos/learn-co-curriculum/object-oriented-people/contents/{+path}","compare_url":"https://api.github.com/repos/learn-co-curriculum/object-oriented-people/compare/{base}...{head}","merges_url":"https://api.github.com/repos/learn-co-curriculum/object-oriented-people/merges","archive_url":"https://api.github.com/repos/learn-co-curriculum/object-oriented-people/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/learn-co-curriculum/object-oriented-people/downloads","issues_url":"https://api.github.com/repos/learn-co-curriculum/object-oriented-people/issues{/number}","pulls_url":"https://api.github.com/repos/learn-co-curriculum/object-oriented-people/pulls{/number}","milestones_url":"https://api.github.com/repos/learn-co-curriculum/object-oriented-people/milestones{/number}","notifications_url":"https://api.github.com/repos/learn-co-curriculum/object-oriented-people/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/learn-co-curriculum/object-oriented-people/labels{/name}","releases_url":"https://api.github.com/repos/learn-co-curriculum/object-oriented-people/releases{/id}","created_at":"2014-02-07T19:11:59Z","updated_at":"2015-06-22T00:49:28Z","pushed_at":"2015-08-25T13:28:48Z","git_url":"git://github.com/learn-co-curriculum/object-oriented-people.git","ssh_url":"git@github.com:learn-co-curriculum/object-oriented-people.git","clone_url":"https://github.com/learn-co-curriculum/object-oriented-people.git","svn_url":"https://github.com/learn-co-curriculum/object-oriented-people","homepage":null,"size":507,"stargazers_count":0,"watchers_count":0,"language":"Objective-C","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":3,"forks":0,"open_issues":3,"watchers":0,"default_branch":"master"}},"base":{"label":"learn-co-curriculum:solution","ref":"solution","sha":"6d457241d8940e50ffe828093910049d32f7f151","user":{"login":"learn-co-curriculum","id":6208017,"avatar_url":"https://avatars.githubusercontent.com/u/6208017?v=3","gravatar_id":"","url":"https://api.github.com/users/learn-co-curriculum","html_url":"https://github.com/learn-co-curriculum","followers_url":"https://api.github.com/users/learn-co-curriculum/followers","following_url":"https://api.github.com/users/learn-co-curriculum/following{/other_user}","gists_url":"https://api.github.com/users/learn-co-curriculum/gists{/gist_id}","starred_url":"https://api.github.com/users/learn-co-curriculum/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/learn-co-curriculum/subscriptions","organizations_url":"https://api.github.com/users/learn-co-curriculum/orgs","repos_url":"https://api.github.com/users/learn-co-curriculum/repos","events_url":"https://api.github.com/users/learn-co-curriculum/events{/privacy}","received_events_url":"https://api.github.com/users/learn-co-curriculum/received_events","type":"Organization","site_admin":false},"repo":{"id":16624543,"name":"object-oriented-people","full_name":"learn-co-curriculum/object-oriented-people","owner":{"login":"learn-co-curriculum","id":6208017,"avatar_url":"https://avatars.githubusercontent.com/u/6208017?v=3","gravatar_id":"","url":"https://api.github.com/users/learn-co-curriculum","html_url":"https://github.com/learn-co-curriculum","followers_url":"https://api.github.com/users/learn-co-curriculum/followers","following_url":"https://api.github.com/users/learn-co-curriculum/following{/other_user}","gists_url":"https://api.github.com/users/learn-co-curriculum/gists{/gist_id}","starred_url":"https://api.github.com/users/learn-co-curriculum/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/learn-co-curriculum/subscriptions","organizations_url":"https://api.github.com/users/learn-co-curriculum/orgs","repos_url":"https://api.github.com/users/learn-co-curriculum/repos","events_url":"https://api.github.com/users/learn-co-curriculum/events{/privacy}","received_events_url":"https://api.github.com/users/learn-co-curriculum/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/learn-co-curriculum/object-oriented-people","description":"","fork":false,"url":"https://api.github.com/repos/learn-co-curriculum/object-oriented-people","forks_url":"https://api.github.com/repos/learn-co-curriculum/object-oriented-people/forks","keys_url":"https://api.github.com/repos/learn-co-curriculum/object-oriented-people/keys{/key_id}","collaborators_url":"https://api.github.com/repos/learn-co-curriculum/object-oriented-people/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/learn-co-curriculum/object-oriented-people/teams","hooks_url":"https://api.github.com/repos/learn-co-curriculum/object-oriented-people/hooks","issue_events_url":"https://api.github.com/repos/learn-co-curriculum/object-oriented-people/issues/events{/number}","events_url":"https://api.github.com/repos/learn-co-curriculum/object-oriented-people/events","assignees_url":"https://api.github.com/repos/learn-co-curriculum/object-oriented-people/assignees{/user}","branches_url":"https://api.github.com/repos/learn-co-curriculum/object-oriented-people/branches{/branch}","tags_url":"https://api.github.com/repos/learn-co-curriculum/object-oriented-people/tags","blobs_url":"https://api.github.com/repos/learn-co-curriculum/object-oriented-people/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/learn-co-curriculum/object-oriented-people/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/learn-co-curriculum/object-oriented-people/git/refs{/sha}","trees_url":"https://api.github.com/repos/learn-co-curriculum/object-oriented-people/git/trees{/sha}","statuses_url":"https://api.github.com/repos/learn-co-curriculum/object-oriented-people/statuses/{sha}","languages_url":"https://api.github.com/repos/learn-co-curriculum/object-oriented-people/languages","stargazers_url":"https://api.github.com/repos/learn-co-curriculum/object-oriented-people/stargazers","contributors_url":"https://api.github.com/repos/learn-co-curriculum/object-oriented-people/contributors","subscribers_url":"https://api.github.com/repos/learn-co-curriculum/object-oriented-people/subscribers","subscription_url":"https://api.github.com/repos/learn-co-curriculum/object-oriented-people/subscription","commits_url":"https://api.github.com/repos/learn-co-curriculum/object-oriented-people/commits{/sha}","git_commits_url":"https://api.github.com/repos/learn-co-curriculum/object-oriented-people/git/commits{/sha}","comments_url":"https://api.github.com/repos/learn-co-curriculum/object-oriented-people/comments{/number}","issue_comment_url":"https://api.github.com/repos/learn-co-curriculum/object-oriented-people/issues/comments{/number}","contents_url":"https://api.github.com/repos/learn-co-curriculum/object-oriented-people/contents/{+path}","compare_url":"https://api.github.com/repos/learn-co-curriculum/object-oriented-people/compare/{base}...{head}","merges_url":"https://api.github.com/repos/learn-co-curriculum/object-oriented-people/merges","archive_url":"https://api.github.com/repos/learn-co-curriculum/object-oriented-people/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/learn-co-curriculum/object-oriented-people/downloads","issues_url":"https://api.github.com/repos/learn-co-curriculum/object-oriented-people/issues{/number}","pulls_url":"https://api.github.com/repos/learn-co-curriculum/object-oriented-people/pulls{/number}","milestones_url":"https://api.github.com/repos/learn-co-curriculum/object-oriented-people/milestones{/number}","notifications_url":"https://api.github.com/repos/learn-co-curriculum/object-oriented-people/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/learn-co-curriculum/object-oriented-people/labels{/name}","releases_url":"https://api.github.com/repos/learn-co-curriculum/object-oriented-people/releases{/id}","created_at":"2014-02-07T19:11:59Z","updated_at":"2015-06-22T00:49:28Z","pushed_at":"2015-08-25T13:28:48Z","git_url":"git://github.com/learn-co-curriculum/object-oriented-people.git","ssh_url":"git@github.com:learn-co-curriculum/object-oriented-people.git","clone_url":"https://github.com/learn-co-curriculum/object-oriented-people.git","svn_url":"https://github.com/learn-co-curriculum/object-oriented-people","homepage":null,"size":507,"stargazers_count":0,"watchers_count":0,"language":"Objective-C","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":3,"forks":0,"open_issues":3,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/learn-co-curriculum/object-oriented-people/pulls/9"},"html":{"href":"https://github.com/learn-co-curriculum/object-oriented-people/pull/9"},"issue":{"href":"https://api.github.com/repos/learn-co-curriculum/object-oriented-people/issues/9"},"comments":{"href":"https://api.github.com/repos/learn-co-curriculum/object-oriented-people/issues/9/comments"},"review_comments":{"href":"https://api.github.com/repos/learn-co-curriculum/object-oriented-people/pulls/9/comments"},"review_comment":{"href":"https://api.github.com/repos/learn-co-curriculum/object-oriented-people/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/learn-co-curriculum/object-oriented-people/pulls/9/commits"},"statuses":{"href":"https://api.github.com/repos/learn-co-curriculum/object-oriented-people/statuses/c16b66daae992e02b73dc61a93d1f2c8b127d8df"}}}}