package org.academiadecodigo.bootcamp11.calculator;

/**
 * MIT License
 * (c) 2017 Ricardo Constantino
 */
public enum Operation {
    ADD("+"),
    SUBTRACT("-"),
    MULTIPLY("×"),
    DIVIDE("÷"),
    EXPONENTIATION("^"),
    FACTORIAL("!"),
    SQUAREROOT("√"),
    EQUAL("="),
    RESET("C");

    private String symbol;

    Operation(String symbol) {
        this.symbol = symbol;
    }

    public String getSymbol() {
        return this.symbol;
    }

    public static String showAvailableOperations() {
        String result = "You can run these operations:";
        for (Operation operation : Operation.values()) {
            result += " " + operation.getSymbol();
        }
        return result;
    }
}
