package ru.parsentev.task_001;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

import static org.slf4j.LoggerFactory.getLogger;

/**
 * @author parsentev
 * @since 18.07.2016
 */
public class Calculator {
    private static final Logger log = getLogger(Calculator.class);

    public double getResult() {
        throw new UnsupportedOperationException();
    }

    public void add(double first, double second) {
        throw new UnsupportedOperationException();
    }

    public void substract(double first, double second) {
        throw new UnsupportedOperationException();
    }

    public void multiple(double first, double second) {
        throw new UnsupportedOperationException();
    }

    public void div(double first, double second) {
        throw new UnsupportedOperationException();
    }

    public void expand(double first, double second) {
        throw new UnsupportedOperationException();
    }
}

@@ -53,40 +53,8 @@
 ger;
-%0Aimport org.slf4j.LoggerFactory;
 %0A%0Aim
@@ -243,16 +243,43 @@
 .class);
+%0A    private double result;
 %0A%0A    pu
@@ -316,49 +316,35 @@
     
-throw new UnsupportedOperationException()
+return this.result = result
 ;%0A  
@@ -411,49 +411,31 @@
     
-throw new UnsupportedOperationException()
+result = first + second
 ;%0A  
@@ -508,49 +508,31 @@
     
-throw new UnsupportedOperationException()
+result = first - second
 ;%0A  
@@ -604,49 +604,31 @@
     
-throw new UnsupportedOperationException()
+result = first * second
 ;%0A  
@@ -695,161 +695,359 @@
     
-throw new UnsupportedOperationException();%0A    %7D%0A%0A    public void expand(double first, double second) %7B%0A        throw new UnsupportedOperationException()
+if(second == 0d) %7B%0A            throw new IllegalStateException(%22%D0%9D%D0%B0 %D0%BD%D0%BE%D0%BB%D1%8C %D0%B4%D0%B5%D0%BB%D0%B8%D1%82%D1%8C %D0%BD%D0%B5%D0%BB%D1%8C%D0%B7%D1%8F!%22);%0A        %7D else %7B%0A            result = first / second;%0A        %7D%0A    %7D%0A%0A    public void expand(double first, double second) %7B%0A        double tmp = first;%0A        for (int i = 0; i %3C second - 1; i++) %7B%0A            tmp = tmp * first;%0A        %7D%0A        result = tmp
 ;%0A  

Task_001