#import <Foundation/Foundation.h>
@interface Car:NSObject {
NSString *CarMotorCode;
NSString *CarChassisCode;
}
- (instancetype)initWithMotorValue:(NSString *) motorCode andChassisValue:(NSInteger)chassisCode;
- (void) startCar;
- (void) stopCar;
@end
@implementation Car
- (instancetype)initWithMotorValue:(NSString *) motorCode andChassisValue:(NSInteger)chassisCode{
CarMotorCode = motorCode;
CarChassisCode = chassisCode;
return self;
}
- (void) startCar {...}
- (void) stopCar {...}
@end
The method initWithMotorValue: type andChassisValue: type
will be used to initialize the Car objects.