Lecture7 - Outline CS11600 Introduction to Computer...

Info iconThis preview shows pages 1–2. Sign up to view the full content.

View Full Document Right Arrow Icon
1 CS11600: Introduction to Computer Programming (C++) Lecture 7 Svetlozar Nestorov University of Chicago 1/20/2003 Svetlozar Nestorov, CS 116: Intro to Programming II 2 Outline ± Data encapsulation, ADT, API ± Struct and typedef ± Classes ± Define directives ± Private and public members ± Constructors ± Destructors 1/20/2003 Svetlozar Nestorov, CS 116: Intro to Programming II 3 Data Encapsulation ± Abstract data types (ADT) ± Separate interface from implementation . ± All access to data is through the interface. ± Application program(ming) interface (API) ± Benefits • Modularity, portability • Data integrity ± Design methods 1/20/2003 Svetlozar Nestorov, CS 116: Intro to Programming II 4 Struct ± Create new data type by grouping data members (of other types). ± General form: struct newType { Type1 member1; Type2 member2; } ; ± Notice ; after definition. 1/20/2003 Svetlozar Nestorov, CS 116: Intro to Programming II 5 Struct Examples struct Student { int SID; float gpa;
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Image of page 2
This is the end of the preview. Sign up to access the rest of the document.

Page1 / 3

Lecture7 - Outline CS11600 Introduction to Computer...

This preview shows document pages 1 - 2. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online