Question: Hi everyone, I am trying to solve a java programming assignment, and I am half way but stuck with the rest. The purpose of the

Hi everyone,

I am trying to solve a java programming assignment, and I am half way but stuck with the rest. The purpose of the program is to generate a shopping list based on input from the user about available ingredients at home, and the required ingredients and quantities of recipes to be cooked. The output is the shopping list (what needs to be bought in g). I have to use a method called printShoppingList() that prints the list of ingredients to buy sorted in alphabetical order. If no item is on the shopping list, it has to print just a header 'Shopping List'. Important to note, there might be more than one recipe, and the input must be taken continuously (there is no predefined input size).

  • Example input:

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!