Skip to content

Question, chapter 14, Code / Menu / Implementation choice (p284) #7

Description

@ntalbs

Chapter 14 > Code > Menu (p284)

Implementation choice: We selected HashMap to store MenuItem objects for its quick
lookup performance through key-based access, ensuring efficient retrieval for the Table
class during order processing, whereas a List alternative, while simpler for storage, requires
a linear search that slows access time.

I couldn't find any relevant code that actually uses Menu class to find MenuItem by its name (String). Do you think the above explanation is relevant?

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions