Answered step by step
Verified Expert Solution
Question
1 Approved Answer
j Java please, thank you Title Book Store Management - Read and Write File. Background A Book Store needs a program to manage Book and
j
Java please, thank you
Title Book Store Management - Read and Write File. Background A Book Store needs a program to manage Book and Publisher information. With basic requirements such as creating a Book (or Publisher), displaying Book (or Publisher) information, and updating information, .... Books and Publishers' information are stored in a text or binary file (Book.dat). Program Specifications Build a Book Store management program. With the following basic functions: 1. Publishers management 1.1. Create a Publisher 1.2. Delete the Publisher 1.3. Save the Publishers list to file 1.4. Print the Publisher list from the file. 2. Books management 2.1. Create a Book 2.2. Search the Book 2.3. Update a Book 2.4. Delete the Book 2.5. Save the Books list to file. 2.6. Print the Books list from the file. Others- Quit. Features: This system contains the following functions: * Publishers management - 200 LOC - Function 1: Create a Publisher- 50 LOC - Require to input a piece of Publisher information including Publisherld, PublisherName, and Phone Check the valid data with the following conditions: - Publisherld has pattern "Pxxxxx", with xxxxx is five digits, and is not allowed to duplicate - PublisherName is a string and has a length from 5 to 30 characters. - The phone is a number string that has a length from 10 to 12 : Ask to go back to the main menu. - Function 2: Delete Publisher information - 50 LOC - The user enters the Publisherid from the keyboard - If it does not exist, the notification " Publisherld does not exist". Otherwise, the Publisher can be deleted - Show the result of the delete: success or fail Ask to go back to the main menu. - Function 5: Save to file - 50 LOC - Write a list of the Publisher's information in the file (Publisher.dat). - Ask to go back to the main menu. - Function 6: Print all lists from file - 50 LOC - Loading Publishers' information from the file into the collection Displaying list Publisher information order by PublisherName ascending * Books management 300 LOC - Function 1: Create a Book - 50 LOC - Require to input a piece of Book information including Bookld, BookName, BookPrice, Quantity, Publisherld, and Status Check the valid data with the following conditions: - Bookld has pattern "Bxxxxx", with xxxxx is five digits, and is not allowed to duplicate - Book Name is a string and has length from 5 to 30 characters. - BookPrice is a real number and greater than 0 - Quantity is an integer number and greater than 0 - Status is a string and has values: Available or Not Available - If Publisherld did not exist then show the message "Publisherld not found" Ask to go back to the main menu. - Function 2: Search the Book - 50 LOC - Allow user to search by BookName (a part of BookName) and by Publisherld - Require to enter a search string (a part of Book name) or by Publisherld, and return a list of Book information containing the search string. If the list Book is null, the notification "Have no any Book", else print the list Book information order by the Book Name. Ask to go back to the main menu. - Function 3: Update Book - 50 LOC The user enters the BookID from the keyboard If it does not exist, the notification "BookName does not exist". Otherwise, the Book can edit the remaining information. If the Information is blank, then do not change old information Show the result of the update: success or failure. Ask to go back to the main menu. - Function 4: Delete Book information - 50 LOC The user enters the BooklD from the keyboard If it does not exist, the notification "BookName does not exist". Otherwise, the Book can be deleted Show the result of the delete: success or fail Ask to go back to the main menu. - Function 5: Save to file - 50 LOC - Write a list of the Book's information in the file (Book.dat). - Ask to go back to the main menu. - Function 6: Print all lists from file 50 LOC - Loading list Book information from the file into the Collection - Displaying list Book information order by Quantity descending. If the same Quantity then order by BookPrice ascending Ex: Id Name Price Quantity Subtotal PublisherName Status Note: SubTotal = BookPrice * Quantity - Ask to go back to the main menu. - Function 7: Create a layout - 50 LOC - The program is organized in the form of a function menu. - The support function asks if the user wants to continue or notStep by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started