How to create Book Shop Management system in Java, JavaFX?

You are running a Book shop where you are keeping inventory for all the books.

Design a program with the following interface using JavaFX.

Following GUI is just an example.

You can design in different layout and make sure you put background image, different color, and font for your GUI interface.

Book Shop Java Project code

Write a program which allows you to enter book name, author, price of each book, and number of books in stock of the book through textboxes and store it in ArrayList.

Write button reads value from arraylist and write into file as per follows:

  • javaprogramming,danialliang,99.50,10
  • database,johny,50.45,6
  • javaprogramming,tony,80.30

You can choose any different names to store in file.

Also design and write code for add, save, exit, next, previous and edit button as discussed in class.

Design display button which read information from file and display information in text area as per display in interface. You can calculate TotalPrice=price of book * number of books in stock.

Search button allows you to search data from file. Enter the book name you want to search in text field. Search button compare the name you enter in textfield and the book name that stored in file.

If both names are same than print the entire record in text area including Name, Author, Price, Quantity and TotalPrice

If names does not match than print message like match not found in text area.

public class Book {
private String bookname,author;
private int quantity;
private double price;

public Book() {
}

public Book(String bookname, String author, int quantity, double price) {
this.bookname = bookname;
this.author = author;
this.quantity = quantity;
this.price = price;
}

public String getBookname() {
return bookname;
}

public String getAuthor() {
return author;
}

public int getQuantity() {
return quantity;
}

public double getPrice() {
return price;
}

public void setBookname(String bookname) {
this.bookname = bookname;
}

public void setAuthor(String author) {
this.author = author;
}

public void setQuantity(int quantity) {
this.quantity = quantity;
}

public void setPrice(double price) {
this.price = price;
}
}

Buy Book Shop Management System Full Project

Give a Comment