数据结构与算法一()
Class Definitions A Class definition allows the programmer to group variables and functions together Variables defined in a Class are called data members Functions defined in a class are called member functions or methods Class definitions are often used to implement ADTs Chapter 1: Introduction EXMP: List Classes and Objects A Class is the OOP term for a data structure A Class can be thought of as an Object Factory Class definitions include variables and functions An Object is an instantiation of some Class The type of an Object is the name of the Class whose definition was used to create it Objects occupy storage Chapter 1: Introduction EXMP: List Struct and Class Used to declare aggregate data or data types C has a limited struct capability In C++, structs and classes are very similar Structures and classes allow C and C++ programmers to create user-defined types Support encapsulation Encourage code reuse Chapter 1: Introduction EXMP: List Struct Example struct Employee{ char name[20]; int age; }; The new type is Employee Employee x,y; //creates two instances of Employee data items name and age are members of the struct Chapter 1: Introduction EXMP: List * Data Structures and Algorithms Chapter 1: Introduction Class Information Syllabus Overview Algorithms Data Structures Outline Course website Class information are posted on the course website: /C2247/Asp/Root/Index.asp Lecture notes, programming assignments are posted on the web site frequently! Please visit the class web site as often as possible. Textbooks Textbook: “Data Structures and Algorithms in C++”, Thomson Learning 2000, Adam Drozdek (清华影印) References: 1.“Data structures with C++ Using STL”, William Ford, William Topp, Prentice-Hall, 2nd Edition, 2002 (清华) 2.《数据结构》(C语言版),严蔚敏、吴伟民,清华大学出版社,1996 Pre-requisite: Basic Knowledge in C/C++, Discrete Mathematics Visual C++.net, Borland C++ Builder Office Hours Regular Office Hou
您可能关注的文档
最近下载
- ZXM10 EISU(V1.0)增强智能型采集单元用户手册.pdf VIP
- 政府机关物业管理服务保洁服务工作计划及操作规程服务方案.docx VIP
- 铜铝替代在电线电缆和家电行业的未来趋势展望.pdf
- 23J916-1 住宅排气道(一)图集.pdf VIP
- 油漆表面缺陷分类.pptx VIP
- ZXM10工程安装工艺规范-2012版.doc VIP
- 高清:2023年甘肃省高等职业教育分类考试招生中职升学考试财经商贸类专业基础试题及参考答案.docx VIP
- 2025 高新技术企业认定实操手册(含评分标准).docx VIP
- 商业综合体消防灭火疏散的应急预案范文(通用13篇).docx VIP
- 一种电动缸推拉力测试工装.pdf VIP
原创力文档

文档评论(0)