Skip to content

Submit random menu project #32

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 4 commits into
base: master
Choose a base branch
from
Open

Submit random menu project #32

wants to merge 4 commits into from

Conversation

Guribot
Copy link

@Guribot Guribot commented Aug 10, 2017

Random Menu

Congratulations! You're submitting your assignment.

Comprehension Questions

Question Answer
How did you store menu components? Why? I stored each menu component (adjectives, foods, and twists) in a separate .txt document so that users could modify the lists without having to go into the code. The program then reads each file into its own array.
Could you have stored components using a different data structure? For example, if you used an Array could you have used a Hash? I could have contained the 3 arrays I created inside of a hash (e.g. {:adjective => [], :food => [], :twist => []}
Did you find yourself repeating the same code? Why did you have to do it that way? I did repeat code where the files are opened, read, converted into arrays, and then shuffled - this could be a method taking the filename as an argument.
What type of loop did you use? Why did you choose that type? I used a :times loop so that the length of the menu could be set by a variable.

@droberts-sea
Copy link
Collaborator

Random Menu

What We're Looking For

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

Great work overall. Good job on the optionals. I especially like that you put the program's data into different files - this separation between the code and the data on which it operates makes the program easier to read and work with, and is a theme we'll be exploring a lot in this class.

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