showCookTimeForTurkey() stack figure 5.4


#1

I’m curious why the stack frame for showCookTimeForTurkey is shown when necessaryMinutes = 15 * pounds; and not for the full assignment necessaryMinutes = 15 + 15 * pounds; ?


#2

That is an error in the book. Sorry.


#3

Thanks for the confirmation that it is an error in the book.
This is a great learning experience, with the book and this forum.

Also the function in the program is showCookTimeForTurkey(), and in the figure it is written as showTurkeyCookTime().