Lecture2-1 - DataStructures CSCI 132, Spring 2012 Lecture 2...

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

View Full Document Right Arrow Icon
1 Data Structures   CSCI 132, Spring 2012 Lecture 2 Classes and Abstract Data Types Read Ch 1.1 - 1.6 Read Style Guide (see course webpage)
Background image of page 1

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

View Full DocumentRight Arrow Icon
2 Abstraction and Data Hiding Data Abstraction: Captures essential qualities of an object and names the object. Ignores implementation details Is necessary for managing large, complex software projects. Data Hiding: Hides implementation details from user Prevents user from accessing implementation directly User must interact with object through an interface.
Background image of page 2
3 Classes in C++ A class is a means of abstraction in C++ A class is a specification of a group of objects that all have the same essential properties FOR EXAMPLE . . .
Background image of page 3

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

View Full DocumentRight Arrow Icon
4 A class example class Student Properties (data members) name, graduation year, list of courses, number of courses Operations (methods) List Courses List Student Information Add a Course Set Graduation Date
Background image of page 4
5 An object is an instance of a class For example: object studentA Name: Andrea Student Graduation Year: 2007 List of Courses: CSCI132, MATH331 Number of courses: 2
Background image of page 5

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

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

Page1 / 15

Lecture2-1 - DataStructures CSCI 132, Spring 2012 Lecture 2...

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

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