DOC PREVIEW
UMBC CMSC 341 - CMSC341 Data Structures

This preview shows page 1 out of 4 pages.

Save
View full document
Premium Document
Do you want full access? Go Premium and unlock all 4 pages.
Access to all documents
Download any document
Ad free experience

Unformatted text preview:

CMSC341 Data Structures Lecture 1 Sept 6 2000 Administrivia Description prereqs grading responsibilities Syllabus Web page www cs umbc edu courses undergraduate 341 fall00 1 Projects Projects grading due dates honesty submittal cs341 04 project guidelines project 0 optional project 1 Due Sept 25 Preview Sessions Wed Thurs Sept 6 7 8 30 9 30 SS114 C env Wed Thurs Sept 13 14 8 30 9 30 SS114 Proj1 C Class Class organizes data and operations on that data encapsulation abstraction Definition in header file H h in MAW Implementation in source file C cpp in MAW include the header file 2 IntCell H ifndef IntCell H define IntCell H class IntCell public explicit IntCell int initialValue 0 IntCell const IntCell ic IntCell const IntCell operator const IntCell rhs int read const accessor void write int x mutator private int storedValue endif IntCell C include IntCell H IntCell IntCell int initialValue storedValue initialValue IntCell IntCell const IntCell ic write ic read IntCell IntCell 3 IntCell C cont const IntCell IntCell operator const IntCell rhs if this rhs write rhs read return this int IntCell read const return storedValue void IntCell write int x storedValue x TestIntCell C include IntCell H include iostream h for cout include stdlib h for EXIT SUCCESS int main IntCell m Or IntCell m 0 but not IntCell m IntCell n n m m write 5 cout Cell m contents m read endl cout Cell n contents n read endl return EXIT SUCCESS 4


View Full Document

UMBC CMSC 341 - CMSC341 Data Structures

Download CMSC341 Data Structures
Our administrator received your request to download this document. We will send you the file to your email shortly.
Loading Unlocking...
Login

Join to view CMSC341 Data Structures and access 3M+ class-specific study document.

or
We will never post anything without your permission.
Don't have an account?
Sign Up

Join to view CMSC341 Data Structures and access 3M+ class-specific study document.

or

By creating an account you agree to our Privacy Policy and Terms Of Use

Already a member?