
- This event has passed.
6 PM – Python OOP – Bill
October 15, 2022 @ 6:00 pm - 7:00 pm
Today We Did
- We finished SchoolSystem program.
Homework
- Create a new Book class inside book.py. Add all necessary attributes according to below expected behavior.
- Create BookSystem class inside main.py and add the following features:
- Add book
- Use Dictionary to store books.
- The key of the dictionary would be bookId, the value would be Book class.
- List all books
- Add book
- Examples
Enter one of the following: 1. Exit 2. Add Book 3. List all books 4. Find book by book id 5. Find book by name 6. List all books before year 2010 Please enter your selection: 3 LIST ALL BOOKS 111 - Chamber of Secrets by JK Rowling published on 2012 222 - Goblet of Fire by JK Rowling published on 2013 abcd - The Fellowship of the Ring by JRR Tolkien published on 2022 Enter one of the following: 1. Exit 2. Add Book 3. List all books 4. Find book by book id 5. Find book by name 6. List all books before year 2010 Please enter your selection: 2 ADD NEW BOOK Enter book name: Lightning Thief Enter book author: Rick Riordan Enter publication year: 2005 Enter book id: 333 Enter one of the following: 1. Exit 2. Add Book 3. List all books 4. Find book by book id 5. Find book by name 6. List all books before year 2010 Please enter your selection: 3 LIST ALL BOOKS 111 - Chamber of Secrets by JK Rowling published on 2012 222 - Goblet of Fire by JK Rowling published on 2013 abcd - The Fellowship of the Ring by JRR Tolkien published on 2022 333 - Lightning Thief by Rick Riordan published on 2005