2-1什么是面向对象
What is object?
object=entity
object may be
visible
invisible
Object is variable in programming language.
Object=attributes+services
Data:the properties or status
Operation:the functions
Mapping
From the problem space to the solution one.
C vs. C++
C doesn't support relationship btw data and functions.
typedef struct point3d{
float x;
float y;
float z;
}Point3d;
void Point3d_print(const Point3d* pd);
Point3d a;
a.x=1;a
2-1什么是面向对象最先出现在Python成神之路。
共有 0 条评论