tony de araujo that helped me understand how the code I was writing was executed.
On line 29 we call the scan method from object cashRegister and pass in an item called “eggs”
“eggs” gets inserted into the function via the input parameter item which is an interface.
For this function call instance, “eggs” becomes the value of variable item.
The switch switches the case “eggs” to true, which triggers the function add on line 4 and the value of 0.98 is added to variable total on line 2.