update task.md

This commit is contained in:
Kristofers Solo 2023-11-08 15:04:05 +02:00
parent dbb16c9e9a
commit ff63906a5a

28
TASK.md
View File

@ -16,37 +16,37 @@
## Data structure ## Data structure
- [ ] The inventory list is stored as a Python dictionary. - [X] The inventory list is stored as a Python dictionary.
- [ ] The original list of books can be *hard coded* into the program to avoid having to re-enter the data each time. - [X] The original list of books can be *hard coded* into the program to avoid having to re-enter the data each time.
- [ ] At least the following information is stored for each book: `title`, `author`, `ISBN`, `price` and `quantity in stock`. - [X] At least the following information is stored for each book: `title`, `author`, `ISBN`, `price` and `quantity in stock`.
- [ ] Information for each book is stored in a separate dictionary - [X] Information for each book is stored in a separate dictionary
- [ ] The keys of the inventory dictionary are the `ISBN` codes and its values are the dictionaries containing the information about the book. - [X] The keys of the inventory dictionary are the `ISBN` codes and its values are the dictionaries containing the information about the book.
## Functionality ## Functionality
### Add book ### Add book
- [ ] The user should be given the possibility to add a new book to the inventory. - [X] The user should be given the possibility to add a new book to the inventory.
- [ ] When adding a book, make sure that its ISBN number is unique. If such an ISBN number already exists in the list, display an error message. - [X] When adding a book, make sure that its ISBN number is unique. If such an ISBN number already exists in the list, display an error message.
### Search by ISBN ### Search by ISBN
- [ ] Users should be allowed to search for a book by its ISBN number. - [X] Users should be allowed to search for a book by its ISBN number.
- [ ] If the book was found, display information about it. - [X] If the book was found, display information about it.
- [ ] If the book was not found, display an error message. - [X] If the book was not found, display an error message.
### Search by title or author ### Search by title or author
- [ ] Allow users to search for a book by name in its title or author field. The result is a list of books that match the search criteria. - [X] Allow users to search for a book by name in its title or author field. The result is a list of books that match the search criteria.
### Book list ### Book list
- [ ] Display a list of all books, showing the following information for each book: `title`, `author`, `ISBN`, `quantity in stock`. - [X] Display a list of all books, showing the following information for each book: `title`, `author`, `ISBN`, `quantity in stock`.
### Delete book ### Delete book
- [ ] Delete a book with a given ISBN number from the list. - [X] Delete a book with a given ISBN number from the list.
- [ ] To inform the user that the book was successfully deleted or that the ISBN number was not found. - [X] To inform the user that the book was successfully deleted or that the ISBN number was not found.
## User interface ## User interface