Skip to content

Instantly share code, notes, and snippets.

@jen2
Created May 6, 2017 14:04
Show Gist options
  • Save jen2/f62129c197c8dd8b0ab42dfac057a208 to your computer and use it in GitHub Desktop.
Save jen2/f62129c197c8dd8b0ab42dfac057a208 to your computer and use it in GitHub Desktop.
Code for Dinner class in "An Introduction to Categories in Objective-C."
//Dinner.h
#import <Foundation/Foundation.h>
@interface Dinner: NSObject
@property (nonatomic, strong) NSString *appetizer;
@property (nonatomic, strong) NSString *mainDish;
@property (nonatomic, strong) NSString *dessert;
@property (nonatomic, strong) NSArray *ingredientsForAppetizer;
@property (nonatomic, strong) NSArray *ingredientsForMainDish;
@property (nonatomic, strong) NSArray *ingredientsForDesert;
@property (strong)NSUInteger cookTimeInMinutes;
@property (strong)NSUInteger numberOfForks;
@property (strong)NSUInteger numberOfPlates;
@property (strong)NSUInteger numberOfSpoons;
@property (strong)NSUInteger numberOfNapkins;
@property (strong)NSUInteger numberOfWaterGlasses;
- (void)prepareAppetizer;
- (void)cookMainDish;
- (void)prepareDesert;
- (void)setTable;
@end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment