Question: Given two integers as user inputs that represent the number of drinks to buy and the number of bottles to restock, create a Vending
Given two integers as user inputs that represent the number of drinks to buy and the number of bottles to restock, create a Vending Machine object that performs the following operations: Purchases input number of drinks Restocks input number of bottles Reports inventory . The Vending Machine is found in Vending Machine.java. A Vending Machine's initial inventory is 20 drinks. Ex: If the input is: 52 the output is: Inventory: 17 bottles 505824.2496179.xxx7 LAB ACTIVITY 1 import java.util.Scanner; 2 3 public class LabProgram ( 4 5 67694d 8 7.28.1: LAB: Vending machine 10 } 11 Current file: LabProgram.java. public static void main(String[] args) { Scanner scnr = new Scanner(System.in); /* Type your code here. */ 0/10 Load default template...
Step by Step Solution
3.42 Rating (149 Votes )
There are 3 Steps involved in it
To create a Java program for the Vending Machine you can follow these steps 1 Create a VendingMachin... View full answer
Get step-by-step solutions from verified subject matter experts
