Java-Bootcamp-Resources, launch the
Workbook 2.3 folder.
The Apple Store
The workbook starts with three variables.
int numOfApples = 0; int numOfCustomers = 0; double profit = 0;
Decrease your number of apples based on the printed messages.
Increase your number of customers based on the printed messages.
price variable and set it equal to
Increase your profits based on the number of apples sold, and the price of each apple.
Replace each placeholder with a variable.
>> Wow! So far, you made: $89.6 >> 3 customers love your apples. >> You have 276 apples left. We'll sell more tomorrow!
The code solution is beside the starter project.
The video solution is inside the appendix (last section on Udemy).