Hi,
I am trying to develop a Java class which acts as a recipe calculator. What it is supposed to do is that if I give 'Capuccino' as an input parameter, the class should calculate how much milk, how much sugar etc goes into that coffee. The class should return every item that goes into the coffee, and the qty of the item also. I thought that the best way to do so would be to use a tree structure, because there may be 2 or levels under each item also.
Can someone please help or advice?
I am trying to develop a Java class which acts as a recipe calculator. What it is supposed to do is that if I give 'Capuccino' as an input parameter, the class should calculate how much milk, how much sugar etc goes into that coffee. The class should return every item that goes into the coffee, and the qty of the item also. I thought that the best way to do so would be to use a tree structure, because there may be 2 or levels under each item also.
Can someone please help or advice?