11.07.2015 Views

CS 47/147 Advanced Object-Oriented Programming - Caltech

CS 47/147 Advanced Object-Oriented Programming - Caltech

CS 47/147 Advanced Object-Oriented Programming - Caltech

SHOW MORE
SHOW LESS
  • No tags were found...

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

Book Example: File System• A directory has zero or moreentries.– Each entry has a name.– Each entry refers to a file or adirectory.??contentsFileentries*DirEntry+name!!Dir?*parent (~children)• A new set of objects: DirEntry.– Relation entries from Dir toDirEntry.(Inverse relation doesn’t need a name.)– Directories do not share entries.– Entries do not move betweendirectories (immutable).• Also need set Name.– Relation name from DirEntry toName.• What about contents of a DirEntry?Name16

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!