package calc;

/** Storage for the registers of the calculator.
 * @author Gary T. Leavens
 */
public class Registers {
	public static int NUM_REGS = 10;
	private static double[] regs = new double[NUM_REGS];
	
    /**
     * Return the value stored in the register with the given number.
     * @param num the number of the register
     */
    //@ requires 0 <= num && num < NUM_REGS;
    public static double get(int num) {
    	return regs[num];
    }
    
     /**
     * Store a number in the given register.
     * @param num the number of the register
     * @param val the value to place in the register
     */
    //@ requires 0 <= num && num < NUM_REGS;
    public static void put(int num, double val) {
    	 regs[num] = val;
    }   

}
