Homework 01 1 1 Basic Dynamic Array Selection

Homework 01 1 -1 Basic Dynamic Array & Selection Sort 01 C++ (Dynamic Array, Sort & STL) 1 -1 Basic Dynamic Array & Selection Sort jjcao Mostly Based on the assignment of Professor Ligang Liu

Homework 01 1 -1 Basic Dynamic Array & Selection Sort Coding environment Win 32 Console Project (of Visual C++ 2010) Refer to (http: //www. jjcao. net/c. html): 2


Homework 01 1 -1 Basic Dynamic Array & Selection Sort 4 Essentials for high quality coding • • • The Power of Variable Names, [Mc. Connell 2] ch 11 Good Class Interfaces, [Mc. Connell 2] ch 6. 2 High-Quality Routines, [Mc. Connell 2] ch 7 Defensive Programming, [Mc. Connell 2] ch 8 Developer Testing, [Mc. Connell 2] ch 22 Self-Documenting Code, [Mc. Connell 2] ch 32 appendix 2_Coding. Standard&Style in http: //www. jjcao. net/c. html



Homework 01 1 -1 Basic Dynamic Array & Selection Sort Implementation 0 // ���入参数的合法性 [Mc. Connell 2] ch 8. 1 7

Homework 01 1 -1 Basic Dynamic Array & Selection Sort Encapsulation • 由于p 和 n之�有�烈的��关系,自然可以用 struct将它� “包”在一起� 理,�: – http: //www. math. zju. edu. cn/ligangliu/Courses/Data. Structure_20052006/Source. Codes/C 2 C++/Array 1. 0. rar – http: //www. math. zju. edu. cn/ligangliu/Courses/Data. Structure_20052006/Source. Codes/C 2 C++/Array 1. 1. rar 8

Homework 01 1 -1 Basic Dynamic Array & Selection Sort Encapsulation // [Mc. Connell 2] ch 10. 3 Guidelines for Initializing Variables // [Mc. Connell 2] ch 10. 4 keep Variables “Live” for as Short a Time as Possible 9


Homework 01 1 -1 Basic Dynamic Array & Selection Sort More encapsulation 11






- Slides: 17