import java.io.*; import java.util.*; class Ingredient { Ingredient(Scanner scanner) { name=scanner.next(); weight=scanner.nextDouble(); percentage=scanner.nextDouble(); } String name; double weight; double percentage; public String toString() { return name + " " + weight + " " + percentage; } } class Recipe { ArrayList ingredients = new ArrayList(); int servings; int desiredServings; Recipe(Scanner scanner) { int numIngredients = scanner.nextInt(); servings = scanner.nextInt(); desiredServings = scanner.nextInt(); for (int i=0; i