Skip to content

kimberleyamackenzie/Random-Menu

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

18 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Random Menu Generator

Create a program that runs from the Terminal that will create a random menu based on several items that you determine.

This is a stage 1 individual project.

Baseline

Come up with the three arrays of ten items each. Each list should be a different type of food or descriptor for that food.

For example, the first array can contain adjectives, the second, cooking styles and the third, foods. If this was the array selection, it could create a few items like:

  • hot pan-fried dumplings
  • soft steamed clams
  • etc.

Primary Requirements

Create a random menu generator that can be played from the Terminal.

Your generator should pull one item from each array you made in the baseline requirements to create a "menu item".

When the program runs, it should create and show a list of ten numbered menu items.

1. hot pan-fried dumplings
2. soft steamed clams
3. ...
...
10. creamy taco cake

Test & Verify

Before you submit your work it's important to test your program and ensure it's working properly. Later we will teach you nifty ways to automate this testing, but for now we'll do things the old fashioned way.

Make sure you run your program and ensure it's working. Among your tests ensure that:

  • The menu items are selected randomly.
  • There are 10 menu items.
  • Each item should pull one word from each of the 3 arrays.
  • The items are numbers 1-10 (not starting at zero).
  • Run the program a few times and ensure that the last word in the arrays are used. Also ensure that the first word in the arrays are used at least occasionally.

Optional Enhancements

  • Expand your solution to ensure that no descriptive term in a menu item is ever repeated. So if the first menu item is hot pan-fried dumplings, the the phrases hot, pan-friend and dumpling cannot individually be used in any other menu items.
  • Expand your solution to allow the user to determine how many items they'd like to see via user input. Note: You will need to ensure that this user-chosen number of items is not larger than the number of items you have in your arrays.
  • Instead of using hardcoded or predefined arrays, make your program accept user input. This user input will be utilized to generate the menu items. You'll need to prompt for and store a varying number of entries for each food-type array.

About

Random Menu Generator

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Ruby 100.0%