im stumped... mainly because i havent seen non csv files. that being said. should i create a split("\n\n") method and then a split("\n")?
file.txt
Pancake dough
60
milk
egg
flour
salt
butter
Meatballs
20
ground meat
egg
breadcrumbs
Tofu rolls
30
tofu
rice
water
carrot
cucumber
avocado
wasabi
import java.util.ArrayList;
import java.util.Scanner;
public class RecipeSearch {
public static void main(String[] args) {
Scanner scanner = new Scanner(System.in);
ArrayList<String> recipes = new ArrayList<>();
System.out.println("File to read: ");
String file = scanner.nextLine();
UserInterface ui = new UserInterface(file);
ui.start();
System.out.println("Commands:");
System.out.println("list - lists the reciples");
System.out.println("stop - stops the program");
// System.out.println("find name - searches recipes by name");
ui.command();
}
}
