For this assignment, you are going to pretend that you work for a library and you wish to store information on the titles you have available.

In order to do this, you are going to create a database that stores the following information (all fields are required except for retail price):

  • Book title
  • Author
  • ISBN
  • Number of copies purchased
  • Number of copies not checked out
  • Retail price of the book

In addition, you should think about how you are going to uniquely identify each row.

In your application, you will present your user with the following options:

1. Show all books
2. Add a book
3. Edit a book
4. Remove a book
5. Exit program

Your program must not terminate unless a user selects option #5.

When the user selects option #1, you must print out each individual row of data using a loop, not by printing out the variable containing all of your data.

When a user adds or edits a book, you must validate the input according to the following rules:

  • Book Author and must be comprised of primarily upper and lower case letters. It also cannot contain any of the following characters: ! " @ # $ % ^ & * ( ) _ = + , < > / ? ; : [ ] { } \ ).
  • Book Title can literally have anything in it, but be very careful about quote characters!
  • The ISBN number can only have numbers and the - symbol in it
  • Number of copies purchased must be an integer
  • Number of copies not checked out must be an integer
  • Retail price of the book must be a float value

When a user edits a book, you must ask them what field\column they would like to edit and then gather the input for that field.

When a user wishes to remove a book, please have the user confirm the deletion of the book before removing it.

The rest of your implementation details are up to your discretion, applying the things you have learned about Python so far. Please note, however, that you must organize any classes/functions into modules and produce documentation (using Pydoc) for your work using the principles discussed earlier in the class. You must also include exception handling in your code according to the principles previously discussed.

You must also create a set of test cases for the validation parts of your application applying the principles discussed in the class. Please also include an export of your database.

Academic Honesty!
It is not our intention to break the school's academic policy. Posted solutions are meant to be used as a reference and should not be submitted as is. We are not held liable for any misuse of the solutions. Please see the frequently asked questions page for further questions and inquiries.
Kindly complete the form. Please provide a valid email address and we will get back to you within 24 hours. Payment is through PayPal, Buy me a Coffee or Cryptocurrency. We are a nonprofit organization however we need funds to keep this organization operating and to be able to complete our research and development projects.