Write a program to manage a book catalog

Assignment Help JAVA Programming
Reference no: EM131588713

Book Cataloging System

Write a program to manage a Book Catalog. The catalog would contain a collection of books, with following fields of information: book code (unique for each book; must be valid - see ISBN validation rules in this assignment for more info), author's last name, author's first name, book title, year of publication and price. The book catalog should use a file for storing books.

The information in the file uses tabs to separate each of the field of a book, with one book per line. Refer to sample file: booklist.txt for more details.

Usage Requirements:

1. At the start, the program should load the catalog from file (Books.txt from current directory), if it doesn't exist, create a new catalog.

2. The program should allow the user to add a new book to the catalog. The program should ask for the required information and then add the book to the catalog, only if same book code doesn't already exist in the catalog and if the book is a valid. Book is considered valid, if the book code is valid, name and title are valid (name can't start with numbers, name/title can't be empty, price is not negative or zero, year cannot be greater than 2013)

3. The program should allow user to find a book in the catalog, given one of the following: author first name or last name or the book code. If the book is found, all the information about the book should be displayed. If the book is not found, an appropriate message should be displayed.

4. The program should allow user to delete an existing book from the catalog.

5. The driver (or client) program should have a menu driven interface (console) to allow users to select one of the options to perform the above tasks and repeat them till the program is exited. The program should display appropriate messages to the user for each operation, successful or not.

6. When exiting, the program should ask to save Yes/No the book catalog to file, taking in to account any of the above changes, for future reuse.

Design/Implementation Requirements:

1. Book Class - represents one book. In addition to accessor (get) and mutator (set) methods for instance variables, this class should not allow instantiation of book objects unless the initialization values are valid including book code. This class also should override the toString method.

2. BookCatalog Class - represents a collection of books. The data structure used for storing books should be a linked list of books. You are required to implement this linked list structure yourself and NOT use any Java API collection, Arrays and Collections types. This class should override toString method and provide methods for all book catalog operations as specified by the usage requirements.

3. BookCatalogClient Class - This class contains the main method. The above classes should be I/O independent to be utilized by console, applet, file based applications. Therefore, for this program, the file save and load operations are implemented by the client class.

Book code validation rules:

An ISBN (International Standard Book Number) identifies a unique publication. An ISBN is ten digits. The first nine digits must be decimal digits (0...9). The tenth digit can be either a decimal digit or the letter X. Three single dashes may be between any of the characters. (i.e., an ISBN number may either have no dashes or exactly three dashes). Also, an ISBN must not begin or end with a dash, and sequential dashes are not allowed.

Some valid example ISBNs: 0-201-88337-6
0-13-117334-0
0821211315 (no dashes is ok) 1-57231-866-X

The last character of an ISBN number is a checksum. The checksum is determined from the first 9 digits; it is computed by taking modulo 11 (the remainder after dividing by 11) of the sum of each digit multiplied by its position in the ISBN. The letter X corresponds to a value of 10.
Here are two ISBNs and the calculations that show how the check sum is determined: 0-201-88337-6:(0*1 + 2*2 + 0*3 + 1*4 + 8*5 + 8*6 + 3*7 + 3*8 + 7*9)mod 11=6
1-57231-866-X:(1*1 + 5*2 + 7*3 + 2*4 + 3*5 + 1*6 + 8*7 + 6*8 + 6*9)mod 11=10(X)
For more info, check out: www.isbn.org.

Some invalid ISBNs:
0-201-8A337-6 (bad digit)
0-201-88337-63 (too many digits) 0-201-88-337-6 (too many dashes) 0-201883376 (not enough dashes) 0-201-88337-3 (wrong check sum)
-013-117334-0 (beginning or ending dash) 157231--866-X (sequential dashes)
013-1134-0 (too few digits)

Comment your code including: (1) Header with Course Name, Program Name, File Name, Date, Programmer Name and Program Description, and (2) comments throughout the source code.

Submit the following by using Canvas Online assignment submission:

1. Source-code files for Book, BookCatalog and Driver (*.java),

2. Comprehensive sample runs to demonstrate the key features of your program,

3. Summary of your work - problems/issues with this assignment, any additional things/features that you've thought of etc. Feel free to combine items: 2 & 3 in a single text document,

4. Place all of the above files in a folder, zip the folder and attach when submitting.

Please retain a copy of everything that you submit for your records.

Attachment:- booklist.rar

Reference no: EM131588713

Questions Cloud

Communication diagram would be a better modeling tool : Describe situations when you would use a sequence diagram and when a communication diagram would be a better modeling tool.
Who focused on parent and community involvement with schools : Who focused on parent and community involvement with schools. What are six ways schools can partner with parents
What amount should be the company report for inventory : A company determined the following values for its inventory, What amount should be the company report for inventory on its balance sheet
What types of quantifiable metrics can you propose : What types of quantifiable metrics can you propose to measure progress in implementing the recommended corrective actions?
Write a program to manage a book catalog : CSC 143 PROGRAMMING - Write a program to manage a Book Catalog. The catalog would contain a collection of books, with following fields of informatio
Reflect on your favorite movie or television show : Reflect on your favorite movie or television show from the past year. Watch the movie or episode again, and pay attention to product placement.
Discuss perceive speech and verbal language categorically : Unlike vision, touch, smell, or taste, we perceive speech and verbal language categorically. What does this mean, and why would that be helpful
What is the basis for the recommendation : What approach/tool would you use to evaluate the options? Which option would you recommend and what is the basis for the recommendation?
What is the cost of inventory in the current year : The cost of materials included abnormal waste of $10,000. What is the cost of inventory in the current year

Reviews

Write a Review

JAVA Programming Questions & Answers

  Implements both the quicksort and mergesort algorithms

Write a program that correctly implements both the Quicksort and Mergesort algorithms. The program should generate an array of 500 random numbers in the 1-100 range. The program should sort the same set of numbers and keep time stamps of how long it ..

  Create a recursive factorial program

Assignment 1: Create a recursive factorial program that prompts the user for an integer  N  and writes out a series of equations representing the calculation of  N !. For example, if the input is 4, the output could be:

  Create a graphical application stackdemogui

Create a graphical application StackDemoGUI that provides a button for push and pop from a stack, a text field to accept a string as input for push, and a text area to show the contents of the stack after each operation.

  Writing a program that evaluates infix expressions

CMSC 350 - writing a program that evaluates infix expressions of unsigned integers using two stacks. The program should consist of three classes

  Program should assign a seat in the first class

If a person enters 1, your program should assign a seat in the first class (rows 1 - 3). If a person enters 2, your program should assign a seat in business class (rows 4 - 7). If a person enters 3, your program should assign a seat in economy class ..

  Write test code to create several pizzas

Write test code to create several pizzas and output their descriptions. For example, a large pizza with one cheese, one pepperoni and two ham toppings

  Design a class named fan to represent a rotating fan

create a class containing a number of static methods for processing an array of marks. Design a class named Fan to represent a rotating fan.

  How use of asnychronous javascript and xml impacts

Assignments one and six of this course are closely related. The 6th assignment involves writing a research report (more specifically, a literature review) on a topic related to web data management. To help you start, this first assignment is meant..

  Group of data elements describes a single entity or event

Which of the following data structures is a group of data elements that usually describes a single entity or event?

  Program that allows the user to enter the last names

Write a program that allows the user to enter the last names of 5 candidates in a college election and the votes received by each candidate. The program should then output each candidates name, the votes reveived by that candidate

  Part - a1nbsp to compile and run a java source file

part - a1.nbsp to compile and run a java source file hello.java that contains a main method which of the following are

  Write a java program to assign the integer values

Write a Java program to assign the integer values 1 through 25 to a 25 element integer array. Then, print the array as five separate lines each containing five elements separated by commas. The last element on each line should be followed by a new..

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd