import java.nio.file.Path;
import java.nio.file.Paths;
import java.util.ArrayList;
import java.util.Scanner;

public class Menu 
{
    private static ArrayList<MenuItem> menuList = new ArrayList<>();
    
    //Constructor
    Menu()
    {
    
    }
    
    public void createMenu()
    {
        //Reads file and sends the code, name and price to setMenuItem()        
        String FILE_NAME = System.getProperty("user.home") + "\\CS2336-501\\Menu.txt";
        Path path = Paths.get(FILE_NAME);
        
        String code, name;
        double price;
        
        try
        {
            Scanner sc = new Scanner(path);
            
            while(sc.hasNextLine())
            {
                code = sc.next();
                name = sc.next();
                price = sc.nextDouble();               
                MenuItem food = new MenuItem(code, name, price);
                menuList.add(food);
            }
        }
        catch(Exception ex)
        {
            System.out.print(ex.toString());
        }        
    }
       
    public void displayMenu()
    {
        System.out.println("Code \t\t Name \t\t Price");
        
        //Prints menu
        for(int i = 0; i < menuList.size(); i++)
        {
            System.out.printf("\n %2s %25s \t %4.2f", menuList.get(i).getItemCode(), menuList.get(i).getItemName(), menuList.get(i).getItemPrice());
        }
    }
}

@@ -1,59 +1,4 @@
-import java.nio.file.Path;%0Aimport java.nio.file.Paths;%0A
 impo
@@ -24,34 +24,8 @@
 ist;
-%0Aimport java.util.Scanner;
 %0A%0Apu
@@ -198,555 +198,63 @@
 Menu
-()%0A    %7B%0A        //Reads file and sends the code, name and price to setMenuItem()        %0A        String FILE_NAME = System.getProperty(%22user.home%22) + %22%5C%5CCS2336-501%5C%5CMenu.txt%22;%0A        Path path = Paths.get(FILE_NAME);%0A        %0A        String code, name;%0A        double price;%0A        %0A        try%0A        %7B%0A            Scanner sc = new Scanner(path);%0A            %0A            while(sc.hasNextLine())%0A            %7B%0A                code = sc.next();%0A                name = sc.next();%0A                price = sc.nextDouble();               %0A        
+Item(String code, String name, double price)%0A    %7B    %0A
     
@@ -306,24 +306,16 @@
 price);%0A
-        
         
@@ -338,133 +338,8 @@
 d);%0A
-            %7D%0A        %7D%0A        catch(Exception ex)%0A        %7B%0A            System.out.print(ex.toString());%0A        %7D        %0A
     

Update Menu.java