Need this java code its on zybooks. given two integers as user inputs that represent the number of drinks to buy and the number of bottles to restock, create a vendingmachine object that performs the following operations:


purchases input number of drinks

restocks input number of bottles

reports inventory

the vending machine is found in vendingmachine.java. a vendingmachine's initial inventory is 20 drinks.


ex: if the input is:


5 2

the output is:


inventory: 17 bottles.


the file that comes with it:


// simulates a simple vending machine with operations to purchase drinks and check inventory.

public class vendingmachine {


// number of bottle in stock

private int bottles;


// initial inventory is 20

public vendingmachine(){

bottles = 20;

}


public void purchase(int amount){

bottles = bottles - amount;

}


public int getinventory(){

return bottles;

}


public void restock(int amount){

bottles = bottles + amount;

}


public void report(){

system.out.println("inventory: " + bottles + " bottles");

}


}