In this lab, you will experiment with Objective C fundamentals in a Mac terminal application that does not display any user interface. Everything you do in this lab is applicable to iOS as well – we will not use any API that is not available in iOS.
Begin by creating an Xcode project of type OS X > Application > Command Line Tool. (In the Type combo box, select “Foundation” if it isn’t selected.) Add classes as necessary per the instructions below using File > New > File, OS X > Cocoa > Objective C Class.
Implement a PlayingCard class that has the following methods, initializers, and properties:
NSString* suit
propertyNSUInteger rank
property (valid values are 1-13, where 1 = “Ace”, …, 13 = “King”)NSString* contents
read-only property that returns the card name (e.g. “Jack of Spades”)