Well assuming you are doing something with the iphone or mac in cocoa you can simply subclass NSObject (the base class in objective-c).
You need a .h and .m so for you example it would be something like:
(Note that I used slotId instead of id because id is a keyword in objective-c)
Slot.h
// Slot.h
@interface Slot : NSObject {
NSInteger slotId;
float xPos;
float yPos;
BOOL empty;
}
@property NSInteger slotId;
@property float xPos;
@property float yPos;
@property BOOL empty;
@end
// Slot.m
#import "Slot.h"
@implementation Slot
@synthesize slotId;
@synthesize xPos;
@synthesize yPos;
@synthesize empty;
@end
That defines a simple Slot object with 4 properties which can be accessed using dot notation such as:
s = [[Slot alloc] init];
s.empty = YES;
s.xPos = 1.0;
s.yPos = 1.0;
There are a lot of variations for which data types you use and how you define the properties, etc depending on what kind of data you are dealing with.
If you wanted to add a slot object to an array one simple example:
// create an array and add a slot object
NSMutableArray *arr = [NSMutableArray array];
Slot *slot = [[Slot alloc] init];
[arr addObject:slot];
// set the slot to empty
[[arr objectAtIndex:0] setEmpty:YES];