2. New program suggestion

2.1. Starbuzz has no beans

  • The director of Starbuzz wants an option to quickly buy without waiting for the price to drop

  • When running the program, it will ask you if you want to buy now or not

  • If the user answers yes, it will take the current price and buy it

  • If not, it will wait until it drops below 4.74

2.2. New program suggestion

2.3. Ugly program…

  • Don’t duplicate your code…

  • This leads to code bloat, making the maintenance of your code difficult

  • Try to reuse your code

  • By defining functions we will reuse code

  • What’s the difference?

  • If I have to change something, I’ll change it in one place.

You have attempted of activities on this page