//
// Student.m
// OC2
//
// Created by dllo on 15/10/23.
// Copyright (c) 2015年 dllo. All rights reserved.
//
#import "Student.h"
#import "A.h"
@implementation Student
- (void)sumWithnum1:(NSInteger)num1 num2:(NSInteger)num2
{
NSInteger sum = num1 + num2;
NSLog(@"%ld",sum);
}
- (void)sumWithnum1:(NSInteger)num1 num3:(NSInteger)num3
{
NSInteger sum = num1 + num3;
NSLog(@"%ld",sum);
}
- (void)sumWithnum1:(NSInteger)num1 :(NSInteger)num2 :(NSInteger)num3
{
NSInteger sum = num1 + num3 + num2;
NSLog(@"%ld",sum);
}
- (void)print
{
NSLog(@"%@%@%ld%f", _name, _sex, _age, _score);
}
- (void)setSex:(NSString *)sex{
_sex = sex;
}
- (NSString *)sex
{
return _sex;
}
- (void)setAge:(NSInteger)age
{
_age = age;
}
- (NSInteger)age
{
return _age;
}
- (void)setScore:(CGFloat)score
{
_score = score;
}
- (CGFloat)score{
return _score;
}
- (void)setName:(NSString *)name
{
_name = name;
}
- (NSString *)getName
{
return _name;
}
- (id)initWithName:(NSString *)name sex:(NSString *)sex{
_name = name;
_sex =sex;
return self;
}
//- (id)init
//{
// _name =@"yuhao";
// _age = 22;
// _score = 98;
// return self;
//}
@end