do I get my program to incorporate all of my files and not just VendingMachine1.java? It seems to be getting stuck on that part and not incorporating the other classes and files. Bucket.java Coin.java Inventory.java Item.java NotFullPaidException.java NotSufficientChangeExectption.java SoldOutException.java VendingMachine.java VendingMachine1.java VendingMachineImpl.ja

Computer Networking: A Top-Down Approach (7th Edition)
7th Edition
ISBN:9780133594140
Author:James Kurose, Keith Ross
Publisher:James Kurose, Keith Ross
Chapter1: Computer Networks And The Internet
Section: Chapter Questions
Problem R1RQ: What is the difference between a host and an end system? List several different types of end...
icon
Related questions
Question

How do I get my program to incorporate all of my files and not just VendingMachine1.java? It seems to be getting stuck on that part and not incorporating the other classes and files.

Bucket.java
Coin.java
Inventory.java
Item.java
NotFullPaidException.java
NotSufficientChangeExectption.java
SoldOutException.java
VendingMachine.java
VendingMachine1.java
VendingMachineImpl.java

This is VendingMachine1.java: 

import java.util.Scanner;

public class VendingMachine1 {

    public static void main(String[] args) {
        
        VendingMachineImpl vm =  new VendingMachineImpl();
    

        //showmenuItem(coin, drink, quantity);

        Inputcoin(vm);
        InsertItem(vm);

        //showdrinks(drink);
        
        //showbalance(sumcoinInsert, price);

        }

        

    public static void Inputcoin(VendingMachineImpl vm )

        {
            
            int coinInsert, sumcoinInsert=0;
            int flag=0;
            do{
                Coin[] coins = Coin.values();
                Scanner sc= new Scanner(System.in);

                System.out.println(" Insert the new coins - 1,5,10,25");
        
                coinInsert= sc.nextInt();
        
                for(Coin coin:coins){
                    if(coin.getDenomination() == coinInsert){
                        vm.InsertCoin(coin);
                        sumcoinInsert += coinInsert;
                        break;
                    }
                }
                    
                System.out.println("Do you want to insert more coins (y/n)?");
                String choice = sc.next();
                
                if(choice.equalsIgnoreCase("y")){
                    flag =1;
                }
                else
                {
                    flag =0;
                }

                
            }while(flag !=0);
            
        System.out.println(" Total " +sumcoinInsert);

        }
        
        public static void InsertItem(VendingMachineImpl vm )

        {
            Scanner sc = new Scanner(System.in);

            String insertedItem=null;
        int itemflag=0;
        int insertedQty;
        do{
            
            System.out.println("Insert ITEM <coke,pepsi,soda> ");
                
            insertedItem = sc.next();
            
            System.out.println("Insert Quantity ");
                    
            insertedQty = sc.nextInt();
            
            Item[] items = Item.values();
            
            for(Item item:items){                    
                
                if(item.getName().equals(insertedItem) ){
                    Item insertItem = item;
                    vm.SelectItemAndGetPrice(insertItem);
                    break;
                }
            }        

            System.out.println("Do you want to Insert more Item(y/n) ");
        
            String isMoreItem =sc.next();
            if(isMoreItem.equals("y")){
                itemflag=1;
            }else{
                itemflag=0;
            }
            
        }while(itemflag==1);

        }
    }

 

 

Console X Problems @Javadoc Declaration
<terminated> Vending Machine1 [Java Application] C:\Users\bmore\.p2\pool\plugins\org.eclip
coke
Insert Quantity
1
Do you want to Insert more Item(y/n)
n
Transcribed Image Text:Console X Problems @Javadoc Declaration <terminated> Vending Machine1 [Java Application] C:\Users\bmore\.p2\pool\plugins\org.eclip coke Insert Quantity 1 Do you want to Insert more Item(y/n) n
Expert Solution
steps

Step by step

Solved in 3 steps

Blurred answer
Similar questions
Recommended textbooks for you
Computer Networking: A Top-Down Approach (7th Edi…
Computer Networking: A Top-Down Approach (7th Edi…
Computer Engineering
ISBN:
9780133594140
Author:
James Kurose, Keith Ross
Publisher:
PEARSON
Computer Organization and Design MIPS Edition, Fi…
Computer Organization and Design MIPS Edition, Fi…
Computer Engineering
ISBN:
9780124077263
Author:
David A. Patterson, John L. Hennessy
Publisher:
Elsevier Science
Network+ Guide to Networks (MindTap Course List)
Network+ Guide to Networks (MindTap Course List)
Computer Engineering
ISBN:
9781337569330
Author:
Jill West, Tamara Dean, Jean Andrews
Publisher:
Cengage Learning
Concepts of Database Management
Concepts of Database Management
Computer Engineering
ISBN:
9781337093422
Author:
Joy L. Starks, Philip J. Pratt, Mary Z. Last
Publisher:
Cengage Learning
Prelude to Programming
Prelude to Programming
Computer Engineering
ISBN:
9780133750423
Author:
VENIT, Stewart
Publisher:
Pearson Education
Sc Business Data Communications and Networking, T…
Sc Business Data Communications and Networking, T…
Computer Engineering
ISBN:
9781119368830
Author:
FITZGERALD
Publisher:
WILEY