Hi,
I am beginning to program and as an exercise I want to convert a meal planner I made in excel (with vba) to a Java app.
I want to have "ingredients" which have certain properties like: name, organic (true/false), cost purchased, unit as purchased, cost per unit (calculated field) etc.
I want to have "recipes" which hold ingredients and the recipe (class I would imagine) would have to hold the I gredients and the amount required using the unit used with the cost per unit (I don't know how to do this) it would also be able to calculate the cost of the recipe based on the amount for each ingredient and access the cost per unit of that ingredient.
I eventually would like to have each instance of recipe have a date so that I can have a calendar and I could repeat recipes in a period of time.
My questions are how do I conceptualize this and how do I make it so that a recipe can hold the ingredients (class/subclass or inheritance etc) also if I create a recipe say baked potatoes and then I want to eat that again how do I create 2 instances of the same recipe but for different days.
I don't have much code so I don't think posting it would make a difference.
A secondary question would be. If I turn off the program it will "forget everything" I'm guessing so how can I store my meal plan somewhere where the program can "know it" when it gets turned back on.
Thank you very much for your time.