//
// main.m
// 对象的存储
//
// Created by daxiansheng on 15-8-15.
// Copyright (c) 2015年 ZY. All rights reserved.
//
#import <Foundation/Foundation.h>
@interface Person :NSObject
{
@public
int _age;
float _weight;
NSString *name;
}
//行为
-(void)run;
-(void)swimming;
-(void)eat;
-(void)die;
@end
@implementation Person
-(void)run{
NSLog(@"ta在跑步");
}
-(void)swimming{
NSLog(@"ta在游泳");
}
-(void)eat{
NSLog(@"ta吃了胡一菲的汉堡 |
|