summaryrefslogtreecommitdiffstats
path: root/src/test/misc/en/TestOperation.java
blob: c6763b1f493081310766e9276338a82a1ea87a89 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
package test.misc.en;

public class TestOperation {

	public void test() {
		
        double x = 2;
        double y = 3;

        Operation opp = Operation.DIVIDED_BY;
        
        switch(opp) {
        	case MINUS:
        		System.out.println();
        	case PLUS:
        }
        
        switch(Operation.MINUS) {
    	case DIVIDED_BY:
    		System.out.println();
    	case PLUS:
    	case TIMES:
        }
        
        for (Operation op : Operation.values()) {
            System.out.println(x + " " + op + " " + y + " = " + op.eval(x, y));
        }
		
	}
	
}