123456789101112131415161718192021222324252627282930313233343536373839404142434445464748 |
-
- /**
- * Write a description of class Memory here.
- *
- * @author (your name)
- * @version (a version number or a date)
- */
- public class Memory
- {
- // instance variables - replace the example below with your own
- public double status, memory;
-
-
- public void status (double status)
- {
- // initialise instance variables
- this.status = status;
- }
-
- /**
- * Constructor for objects of class Memory
- */
- public void display(){
- System.out.println("Current Memory is, " + status);
- }
-
- public void M()
- {
- status = 0.0;
- this.status = status;
- display();
-
- }
-
- public void MRC(double current)
- {
-
- this.status = status += current;
- display();
-
- }
- public double recall()
- {
- return this.status;
-
- }
- }
|