import java.math.BigDecimal;
import java.math.MathContext;

/**
 * Created by K_A_Volchica on 19.03.2015.
 */
public class Main {

    public static void main(String[] args) {

        Money m1 = new Money(new BigDecimal("100.0"), Currency.RUR);
        Money m2 = new Money("100.0", Currency.RUR);

        System.out.println(m1);

        Money m3 = m1.add(m2);

        System.out.println(m3);

        Money m4 = new Money("100.0", Currency.EUR);

        System.out.println(m1.add(m4));

        Money m5=m2.divide(new BigDecimal("2.0"));
        System.out.println(m5);
        Money m6=m1.multiply(new BigDecimal("10.0"));
        System.out.println(m6);


        Quantity s1 = new Quantity (new BigDecimal("1.0"), Kind.D);

        Quantity s2 = new Quantity(new BigDecimal ("10.0"), Kind.TH);

        System.out.println(s1);

        Quantity s4 = new Quantity(new BigDecimal("20.0"), Kind.TH);
        Quantity s5 = s4.subtract(s2);
        System.out.println(s5);


        Quantity s6 = s1.multiply(new BigDecimal ("4.0"));
        System.out.println(s6);

        Quantity s7 = s4.divide(new BigDecimal("50.0"));
        System.out.println(s7);


    }
}