自定义博客皮肤VIP专享

*博客头图:

格式为PNG、JPG,宽度*高度大于1920*100像素,不超过2MB,主视觉建议放在右侧,请参照线上博客头图

请上传大于1920*100像素的图片!

博客底图:

图片格式为PNG、JPG,不超过1MB,可上下左右平铺至整个背景

栏目图:

图片格式为PNG、JPG,图片宽度*高度为300*38像素,不超过0.5MB

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+
  • 博客(10)
  • 收藏
  • 关注

转载 Objective-C 程序设计(第六版)第十一章习题答案

1. 1 #import "Fraction.h" 2 3 @interface Fraction (MathOps) 4 5 - (Fraction *) add: (Fraction *) f; 6 7 - (Fraction *) mul: (Fraction *) f; 8 9 - (Fraction *) sub: (Fracti...

2014-11-21 00:23:00 148

转载 Objective-C 程序设计(第六版)第十章习题答案

1. 1 - (id) init 2 { 3 return [self initWithWidth: 0 andHeight: 0]; 4 } 5 6 - (id) initWithWidth: (int) w andHeight: (int) h 7 { 8 self = [super init]; 9 if (self...

2014-11-19 22:53:00 173

转载 Objective-C 程序设计(第六版)第九章习题答案

1.检测不到reduce方法,因为Complex类中没有定义; 2.合法。因为id类型可以用来存储属于任何类的对象(不能为id变量使用点运算符) 3. 1 //XYPoint类print方法 2 3 4 - (void) print 5 { 6 NSLog(@" (%g , %g) ", x, y); 7 } 8 9 10 /...

2014-11-13 17:20:00 195

转载 Objective-C 程序设计(第六版)第八章习题答案

1.略了吧 步步高点读机 2.所有int类型改为float或double类型 3.略了吧 superclass和subclass的关系搞懂就OK! 4. 1 - (void) translate: (XYPoint *) tp 2 { 3 origin.x = tp.x; 4 origin.y = tp.y; 5 } 6 7 //m...

2014-11-12 14:57:00 173

转载 Objective-C 程序设计(第六版)第七章习题答案

1.各个方法的实现 1 - (Fraction *) subtract: (Fraction *) f 2 { 3 Fraction *result = [[Fraction alloc] init]; 4 5 result.numerator = numerator *f.denominator - denominator *f.num...

2014-11-08 22:16:00 335

转载 Objective-C 程序设计(第六版)第六章习题答案

1. 1 int value1,value2; 2 printf("请输入两个整数,用逗号隔开:"); 3 scanf("%d,%d",&value1,&value2); 4 5 if (value1 % value2 == 0) { 6 print...

2014-11-07 15:59:00 233

转载 Objective-C 程序设计(第六版)第五章习题答案

1. NSLog(@"数字N N的平方"); NSLog(@"--------------------"); for (int n = 1; n <= 10; n++) { NSLog(@"%2d %d",n,n*n); ...

2014-09-28 00:03:00 148

转载 Objective-C 程序设计(第六版)第四章习题答案

1. 非法常量 0x10.5 0X0G1 98.7U 17777s 0996 1.2Fe-7 15,000 . 2. //只需要列出表达式就可以 int F = 27; //设置F为华氏温度,赋值 27 float C ; ...

2014-09-17 21:37:00 177

转载 Objective-C 程序设计(第六版)第三章习题答案

1. 不合法:6_05 (不能以数字开头) A$ ($是非法符号). 2. myBook (openBook,closeBook,readBook,takeBook,putBook). 3. [myBook takeBook]; [myBook openBook]; [myBook readBook]; ...

2014-09-14 16:38:00 266

转载 Objective-C 程序设计(第六版)第二章习题答案

自学iOS中 ,自己看书做的一些答案归类在博客上,方便那些和我一样自学并在读这本书的朋友,纯手工,有错误欢迎指正! 1.略 2. #import <Foundation/Foundation.h> int main(int argc, const char * argv[]) { @autoreleasepool { ...

2014-09-13 18:45:00 210

空空如也

空空如也

TA创建的收藏夹 TA关注的收藏夹

TA关注的人

提示
确定要删除当前文章?
取消 删除