文件名称:OC-Calculator
介绍说明--下载内容均来自于网络,请自行研究使用
OC写的一个关于三角函数的计算器功能 关于分类以及协议, Programming in OC书上的 chapter11中的第四题-The functions sin(), cos(), and tan() are part of the C Standard Library (as scanf ()
is). These functions are declared in the system header file math.h, which is automatically
imported into your program when you import Foundation.h.
You can use these functions to calculate the sine, cosine, or tangent, respectively, of their
double argument, which is expressed in radians. The result is also returned as a double
precision floating-point value. So, you can use this line to calculate the sine of d, with
the angle d expressed in radians:
result = sin (d)
Add a category called Trig to the Calculator class defined in Chapter 6, “Making
Decisions.” Add methods to this category to calculate the sine, cosine, and tangent based
on these declarations:
-(double) sin
-(double) cos
-(double) tan
is). These functions are declared in the system header file math.h, which is automatically
imported into your program when you import Foundation.h.
You can use these functions to calculate the sine, cosine, or tangent, respectively, of their
double argument, which is expressed in radians. The result is also returned as a double
precision floating-point value. So, you can use this line to calculate the sine of d, with
the angle d expressed in radians:
result = sin (d)
Add a category called Trig to the Calculator class defined in Chapter 6, “Making
Decisions.” Add methods to this category to calculate the sine, cosine, and tangent based
on these declarations:
-(double) sin
-(double) cos
-(double) tan
(系统自动生成,下载前可以参看下载内容)
下载文件列表
calculator
..........\Calculator.h
..........\Calculator.m
..........\Calculator_Trig.h
..........\Calculator_Trig.m
..........\bin
..........\...\Debug
..........\...\.....\calculator.exe
..........\calculator.cbp
..........\calculator.depend
..........\gmon.out
..........\main.m
..........\obj
..........\...\Debug
..........\...\.....\Calculator.o
..........\...\.....\Calculator_Trig.o
..........\...\.....\main.o
..........\运行结果.png