Skip to content

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

@ntalbs

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?

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