Jan-09-2020, 10:49 AM
What have you tried and where did you get stuck?
Some ideas:
It's unclear whether you have list of filenames on you should scan a directory. You should address that and process all required files.
For every file program must do:
# read the file:
# store data from file (with association between recipe, ingredient, qty)
Then you have to query stored data to get answers for 4 questions asked.
After identifying general tasks you can proceed with smaller steps:
- how to read file
- how to process data in file
- how to store processed data (which datastructure, which datatype etc)
Some ideas:
It's unclear whether you have list of filenames on you should scan a directory. You should address that and process all required files.
For every file program must do:
# read the file:
# store data from file (with association between recipe, ingredient, qty)
Then you have to query stored data to get answers for 4 questions asked.
After identifying general tasks you can proceed with smaller steps:
- how to read file
- how to process data in file
- how to store processed data (which datastructure, which datatype etc)
I'm not 'in'-sane. Indeed, I am so far 'out' of sane that you appear a tiny blip on the distant coast of sanity. Bucky Katt, Get Fuzzy
Da Bishop: There's a dead bishop on the landing. I don't know who keeps bringing them in here. ....but society is to blame.
Da Bishop: There's a dead bishop on the landing. I don't know who keeps bringing them in here. ....but society is to blame.