summaryrefslogtreecommitdiffstats
path: root/Master/Software Architektur/SWA_Prakt1/src/net/sven_eisenhauer/swa_prakt1/ArithmeticVariable.java
blob: a3b931dae0abb9a01573610dd4dc4819b23e7ad6 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
package net.sven_eisenhauer.swa_prakt1;

public class ArithmeticVariable implements ArithmeticExpression {
	
	private String name;
	private Number value;
	
	public ArithmeticVariable(String name,Number value) {
		this.name = name;
		this.value = value;
	}

	@Override
	public Number evaluate() {
		return value;
	}

	@Override
	public void print() {
		System.out.print(name);
	}
}