reset password
Author Message
John Huang
Posts: 3
Posted 23:06 Feb 09, 2020 |

Hi Professor Keenan,

I understand that in creating Menu1 and Menu2, I need to include the names of the NPCs. Should I use the getter for this or should I manually enter in the NPC names?

kknaur
Posts: 540
Posted 09:17 Feb 10, 2020 |

You should generally never hardcode anything. Imagine you were asked to create that menu system to be dynamic such that if a new npc were created while the program is running, the menu could be redisplayed with the new npc name as a menu choice without having to stop the program and manually update the source code. Always program with future extensibility in mind.