uld be designed as a Desktop Application (with GUI) developed with Java programming language. Note that you are not designing a Web Application or a Mobile Application. Create a project named “FavoriteBooks” which keeps a list of the books that a user has read and liked. This list is stored in a text document (.txt) file and for each book it keeps the following data separated by a comma (,): Book id, Title, Category, First Author Name and Surname, Award Winner, Rating, Year, Number of Pages, and Short Description. Book id: The data type of “Book id” is integer and will be incremented automatically by 1 whenever a new book is added to the list. Title: The data type of “Title” is String. Category: The data type of “Category
It should be designed as a Desktop Application (with GUI) developed with Java programming language.
Note that you are not designing a Web Application or a Mobile Application.
Create a project named “FavoriteBooks” which keeps a list of the books that a user has read and liked.
This list is stored in a text document (.txt) file and for each book it keeps the following data separated by a
comma (,):
Book id, Title, Category, First Author Name and Surname, Award Winner, Rating, Year, Number of Pages, and
Short Description.
Book id: The data type of “Book id” is integer and will be incremented automatically by 1 whenever a
new book is added to the list.
Title: The data type of “Title” is String.
Category: The data type of “Category” is String. It shows the category of a Book such as Arts, Biography,
History, Science Fiction, Cookbook, Literature, etc..
First Author Name and Surname: The data type of “Author Name and Surname” is String.
Award Winner: The data type of “Award” is String. If the book is an award winner, then write only one
award name. If the book is not an award winner, then write “No award”.
Rating: The data type of “Rating” is integer. Rating is between 1 and 5 and shows how much the user
has liked the book.
Year: The data type of “Year” is integer. Year shows the year that the user has finished reading the book.
Number of Pages: The data type of “Pages” is integer.
Short Description: The data type of “Description” is String. The description includes some keywords
about the book that will remind the user what the book is about.
2
A login JFrame Form:
Add a Jframe form for a user login with only the username. The form will have a JTextField component for a
username. It will also have a JButton component. When the button is clicked, check if the username in the text
field is correct or not. If the username is correct, another JFrame that enables the functions explained below will
be visible; otherwise, a message dialog box with the text “incorrect username” appears.
Functions:
1. Add a Book to the list with the given book id from a JTextField.
a) Data to be entered using JTextField components are: Title, Category, Author Name and Surname,
Award Winner, Rating, Year, Number of Pages and short Description. This task should add the book
to the text document.
b) Rating option can be selected from a JComboBox.
c) JTextArea can be used to enter a short description of the book.
d) Do not create a JTextField to enter the book id. Instead, the book id should be incremented
automatically by checking the last book id in the text document.
2. Delete a Book from the list with the given book id from a JTextField. This task should delete the book
with the given id from the text document. A message dialog box should be displayed to show that this
task is completed.
3. Display the information of a book with the book title given fully or as a keyword from a JTextField.
4. Display the image of a book cover with the given book id from a JTextField.
Create 5 sample “book cover” image files (in jpeg format) in your Project folder. An example is
shown below:
You can create your own simple image files using a Paint program.
The file name for book-1 is Book1Cover.jpg, for book-2 is Book2Cover.jpg, and so on.
5. List the books (book title and short description) with respect to the given author name from a JTextField.
6. List the books (book title) with respect to the given category from a JTextField.
7. List the books (book title) with respect to the given category from a JTextField, sorted by their rating.
8. Display the number of books that the user has finished reading in the given year from a JTextField.
Note: How you design the GUI (Graphical User Interface) of your project is optional.
Trending now
This is a popular solution!
Step by step
Solved in 2 steps