- property "brandName", which needs to be the same one for all our bakeries (ie. for all instances of the Bakery class)
- property "location" (specific for each bakery we build)
- method "printLocation" (displays the location of the bakery)
- Add a property "amountOfCakes", were we will keep information about the amount of cakes in stock (initial value: 0)
- Create a method "printAmountOfCakes (displays the amount of cakes in stock)
- Create a method "makeCake" (when this method is invoked, we need to increase the amount of cakes by 1). After you bake a cake, you can display the number of cakes in stock (reuse the function that you already have).
- Add a property "cash", were we will keep information about the money that we have (initial value: 0)
- Add functionality to display the money we have
- Add functionality to sell one cake (decrease stock by 1 & increases money by 3)
- We shouldn't sell a cake if we don't have cakes, right? When a cake is sold, make sure there's actually stock ;)
- Everytime a new cake is created, it costs 1 (deducted from the cash available)
- Everytime a cake is sold, you collect 3
- You can not make new cakes if there's no money
- Initial cash: 2 (we need some initial investment, otherwise we can not start making cakes :p)
Solution: https://stackblitz.com/edit/js-kftsnf?file=index.js