MemoryCell

MemoryCell - { return storedValue; } public void write(...

Info iconThis preview shows page 1. Sign up to view the full content.

View Full Document Right Arrow Icon
// MemoryCell class // Object read( ) --> Returns the stored value // void write( Object x ) --> x is stored public class MemoryCell { // Public methods public Object read( )
Background image of page 1
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: { return storedValue; } public void write( Object x ) { storedValue = x; } // Private internal data representation private Object storedValue; }...
View Full Document

Ask a homework question - tutors are online