Skip to content

carets Julia Meier - Random Menu Generator #46

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

julmeier
Copy link

Random Menu Generator

Congratulations! You're submitting your assignment.

Comprehension Questions

Question Answer
How did you store menu components? Why? I stored menu components in three separate arrays because I was storing all the same type of data in each array, and therefore didn't need a key to differentiate between values.
Could you have stored components using a different data structure? For example, if you used an Array could you have used a Hash? It would be possible to use three different hashes. I believe I could identify the random variable within each hash using a methods hash.key.sample to identify a random element within the hash.
Did you find yourself repeating the same code? Why did you have to do it that way? Yes- for example, on lines 19 to 36, I repeated the same code syntax to receive three separate sets of data from the user. I did it this way because each loop is iterated a different number of times (for example, there may be more food adjectives than food cooking styles being received from the user).
What type of loop did you use? Why did you choose that type? I used the "times-do" and until loops. I used the times loops because the exact number of times the loop needed to be interated was a known variable. I used the "until" loop (lines 39 to 45) to ensure the input received from the user met the business requirement (that the number of menu items would not exceed the number of unique food adjectives.

@tildeee
Copy link

tildeee commented Aug 11, 2017

Random Menu

What We're Looking For

Feature Feedback
Random Menu of 10 items displayed in the terminal. x
Generator pulls one random item from each array to create menu items. x
Baseline
Readable code with consistent indentation. x
Extras

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants