Code example for Stack

Methods: pop

0
 
	private Operation superClass;
	private Operation subClass;
	 
	public ExtendsOperation(Stack<Operation> stack) {
		super(stack);
		superClass = stack.pop();
		subClass = stack.pop();
	} 
 
	public int getArgsNumber() { 
		return 0; 
	} 
 
	public String getStringValue(int level) {
//		return subClass.getStringValue(level)+" extends "+superClass.getStringValue(level); 
        String className = subClass.getStringValue(level);
        String superClassName = superClass.getStringValue(level);
        return "Class({constructor: " + className + ", superClass: " + superClassName + "})";
	}