- Create and use Maps
Convert your list-based library from the previous section into a map-based library. In your map-based list of books, use the title of the book as the key. Also add a new option to your loop to support the following functionality:
- Ask the user if they want to add a book or look up an existing book
- If they want to look up an existing book, ask them for the title of the book
- Using the title they enter, look up the book in your map-based list
- If you find the book, display the book's information and continue your loop
- If you don't find the book, tell the user your library doesn't have that book and continue your loop