MemoryCell - return storedValue public void write Object x...

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

This document was uploaded on 06/13/2011.

Ask a homework question - tutors are online