Access Millions of academic & study documents

CS 415 Data Abstraction and Object Orientation Presentation

Content type
User Generated
Subject
Powerpoint
Type
Presentation
Showing Page:
1/43

Sign up to view the full document!

lock_open Sign Up
Showing Page:
2/43

Sign up to view the full document!

lock_open Sign Up
Showing Page:
3/43

Sign up to view the full document!

lock_open Sign Up
End of Preview - Want to read all 43 pages?
Access Now
Unformatted Attachment Preview
Chapter 10: Data Abstraction and Object Orientation Aaron Bloomfield CS 415 Fall 2005 1 Fundamental OO Concepts • Encapsulation • Inheritance • Dynamic Method Binding 2 Encapsulation • Encapsulation – Encapsulation allows the programmer to group data and the subroutines that operate on them together in one place, and to hide irrelevant details from the user. • Information Hiding – Making objects and algorithms invisible to portions of the system that do not need them. 3 Modules • If a module M exports a type T, the rest of the program can only pass T to subroutines exported from M. – T is said to be an opaque type. var Database : module exports (tuple with (:=, name)) … type tuple = record var name : packed array 1..80 of char … end tuple … • What can the code outside the Database module do? 4 Module Changing • Body is Changed • Private Part of Header is Changed • Public Part of Header is Changed 5 Classes can limit visibility • Private • Protected • Public • Package (in some languages, e.g. Java) 6 Derived class can restrict visibility • Private – Protected and public members of base class are private in derived class. • Protected – Protected and public members of base class are protected in derived class. • Public – Protected and public members of base class are protected and public in derived class. • Private members of base class aren’t visible in derived class. 7 Initialization and Finalizati ...
Purchase document to see full attachment
User generated content is uploaded by users for the purposes of learning and should be used following Studypool's honor code & terms of service.
Studypool
4.7
Indeed
4.5
Sitejabber
4.4