1234567891011121314151617181920212223242526272829303132333435
  1. /**
  2. * Write a description of class Memory here.
  3. *
  4. * @author (Roy Mpanju)
  5. * @version (a version number or a date)
  6. */
  7. public class Memory extends Operations
  8. {
  9. Double numberInMemory = 0.0;
  10. /**
  11. * An example of a method - replace this comment with your own
  12. *
  13. * @param y a sample parameter for a method
  14. * @return the sum of x and y
  15. */
  16. public Double storeInMemory(Double currentDisplay)
  17. {
  18. // put your code here
  19. numberInMemory = currentDisplay;
  20. return numberInMemory;
  21. }
  22. public Double clearMemory(){
  23. return numberInMemory = 0.0;
  24. }
  25. public Double retrieveFromMemory(){
  26. return numberInMemory;
  27. }
  28. //public String
  29. }