Advice for programming
1. Test your code with several valid inputs. If the user is asked to
enter a number of items to order, you may try order 3 items and 100
items, and possibly 0 items. If your program is required to test for
invalid orders, also try to buy -10 items.
2. Take an incremental approach to your work. Code a little, test a
little. Save already-working code as backup in separate C++ files
before building on it to make the larger final code.
3. While debugging, it may be helpful for you to include extra cout
statements telling you the value of different variables across the
runtime of the program.
4. Be careful with every character you type. In case of
compile-errors, check for misspelled words, missing semi-colons,
unbalanced parentheses and braces (e.g., a { without a } later in the
code.)
5. Declare your variables and use proper variable
types for the required tasks
6. Use proper style: good use of spacing, comments, and
meaningful variable names