package com.zedeff.vendingma;

import android.app.Application;

import com.zedeff.vendingma.models.Item;
import com.zedeff.vendingma.services.VendingMachine;
import com.zedeff.vendingma.services.VendingMachineImpl;

import java.math.BigDecimal;

public class App extends Application {

    private static VendingMachine vendingMachine = new VendingMachineImpl();

    @Override
    public void onCreate() {
        super.onCreate();

        // TODO: remove this - testing only
        vendingMachine.addStock(new Item("Cool Coke", new BigDecimal("1.75")), 2);
        vendingMachine.addStock(new Item("Bitter beer", new BigDecimal("3.75")), 1);
        vendingMachine.addStock(new Item("Empty bucket", new BigDecimal("0.15")), 0);
    }

    public static VendingMachine getVendingMachine() {
        return vendingMachine;
    }
}

@@ -61,49 +61,8 @@
 n;%0A%0A
-import com.zedeff.vendingma.models.Item;%0A
 impo
@@ -110,16 +110,16 @@
 achine;%0A
+
 import c
@@ -172,38 +172,8 @@
 l;%0A%0A
-import java.math.BigDecimal;%0A%0A
 publ
@@ -208,16 +208,16 @@
 tion %7B%0A%0A
+
     priv
@@ -290,383 +290,8 @@
 );%0A%0A
-    @Override%0A    public void onCreate() %7B%0A        super.onCreate();%0A%0A        // TODO: remove this - testing only%0A        vendingMachine.addStock(new Item(%22Cool Coke%22, new BigDecimal(%221.75%22)), 2);%0A        vendingMachine.addStock(new Item(%22Bitter beer%22, new BigDecimal(%223.75%22)), 1);%0A        vendingMachine.addStock(new Item(%22Empty bucket%22, new BigDecimal(%220.15%22)), 0);%0A    %7D%0A%0A
     

Remove test data