正在加载图片...
OoP/ Slide 3 procedural programming a sequence of procedures int a, b, c; CC: a=1(x) b=2(); f20 C=f3(z); } Class A int f20 Class B int f30 Int f20 Class c Object oriented programming: a sequence of 'objects'!OOP / Slide 3 int main() { int x,y,z; int a,b,c; a=f1(x); b=f2(y); c=f3(z); … } int f1() { } int f2() { } int f3() { } int main() { A a; B b; C c; a.f1(); b.f2(); c.f3(); … } Class A { Int x; Int f1(); } Class B { Int y; Int f2() } Class C { Int z; Int f3(); } procedural programming: a sequence of ‘procedures’ Object oriented programming: a sequence of ‘objects’!
<<向上翻页向下翻页>>
©2008-现在 cucdc.com 高等教育资讯网 版权所有