import java.util.*;

public class Memory
{
    public static final long UNASSIGNED_MEMORY = 0;

    public Memory ()
    {
        _memory = new HashMap<Long, Long>();
    }

    public long getValue (long address)
    {
        Long v = _memory.get(address);

        return ((v == null) ? UNASSIGNED_MEMORY : v);
    }

    public void setValue (long address, long value)
    {
        _memory.put(address, value);
    }

    private HashMap<Long, Long> _memory;
}
@@ -413,24 +413,296 @@
 ue);%0A    %7D%0A%0A
+    public long total ()%0A    %7B%0A        Collection%3CLong%3E values = _memory.values();%0A        Iterator%3CLong%3E iter = values.iterator();%0A        long total = 0;%0A%0A        while (iter.hasNext())%0A        %7B%0A            total += iter.next();%0A        %7D%0A%0A        return total;%0A    %7D%0A%0A
     private 

Update Memory.java