Design a console based application for a book store using Java and a database for storing information. The features of the application are given in the problem statement.
Problem statement:
• Create a table to hold User details. UserID, userName, Password and
TypeOfUser (Admin, Customer) • The application should first validate the user with his username and password. • And then, options should be displayed based on the logged in user type - If Admin - Option1 - Add a new book Each book must have a title, author, cost per piece, copies available and category it belong to. • There has to be 5 categories – Fiction, History, Psychology, Engineering and Kids. • The new book added should be segregated and stored into the proper category. You should list all the available categories as options to admin while adding a book. • While adding a book, the application should notify if the book is already present and if yes, how many copies are present. You should then update the number of copies in database for that particular book if added. Option 2 - The application should be able to list the books category- wise. Eg: You should give an option to admin to search all books category-wise. Take category as an input and list all books under that category. Include out of stock books as well. Option 3 - The application should give an option to admin to list out all the "out of stock" books. If Customer - Option1 - List all books This option should list all available books with their name, category, cost and author. (Do not include out of stock books) Option2 - The application should be able to list the books category- wise. Eg: You should give an option to customer to search all books category-wise. Take category as an input and list all books under that category. (Do not include out of stock books) Option3 - The customer has to be given an option to search a book based on the title or "part of the title".