Our Feature List0:57 with Jay McGavren
Here's our checklist of features our program is going to need. Over the rest of the course, we'll learn the Ruby features we need to implement each one. Then we'll cross that feature off our list when we're done.
- Display welcome message
- Ask for quantity
- Calculate total
- Discount for large orders
The program needs to greet the user with the message "Welcome to the widget store!" Then it needs to ask them how many widgets they're ordering. It should wait for them to type in a quantity and press Enter. The program will need to store whatever quantity they enter in the computer's memory. Each widget costs $10, so the program should multiply the quantity by 10 to get the total cost. It should print out a message that includes the quantity the user typed in, and the total cost.
The store also wants to offer discounts for ordering a lot of widgets at once. So if a user orders 50 or more widgets, they should only be charged $9 per widget. And if a user orders 100 or more widgets, they should only be charged $8 per widget.
You need to sign up for Treehouse in order to download course files.Sign up