0% found this document useful (0 votes)
118 views1 page

Lab 5 - GUI

The document discusses developing a warehouse management software in Java with a graphical user interface. It provides tutorials on using the Swing library for GUI, serializing objects, reading and writing text files, and using JSON and JAXB. The exercise requires creating a program with menus for adding/removing products from a storage medium like text file or serialized objects, and searching for a product. The program must update product quantities added or removed and remove empty products from storage.

Uploaded by

Văn Nguyễn
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
118 views1 page

Lab 5 - GUI

The document discusses developing a warehouse management software in Java with a graphical user interface. It provides tutorials on using the Swing library for GUI, serializing objects, reading and writing text files, and using JSON and JAXB. The exercise requires creating a program with menus for adding/removing products from a storage medium like text file or serialized objects, and searching for a product. The program must update product quantities added or removed and remove empty products from storage.

Uploaded by

Văn Nguyễn
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 1

Object-Oriented Programming

I. Objectives
- Getting familiar with Java SWING library for graphical user interface
- Getting familiar with multiple methods to store and retrieve data

II. References
- Swing tutorial: https://www.tutorialspoint.com/swing/index.htm
- Serializable interface tutorial: https://www.mkyong.com/java/how-to-write-an-object-to-file-in-java/
- Read text file tutorial: https://www.mkyong.com/java/java-read-a-text-file-line-by-line/
- Write text file tutorial: https://www.mkyong.com/java/how-to-write-to-file-in-java-bufferedwriter-example/
- JSON tutorial: https://www.mkyong.com/java/jackson-2-convert-java-object-to-from-json/
- JAXB tutorial: https://www.mkyong.com/java/jaxb-hello-world-example/

Ill. Exercises

You are required to develop a WAREHOUSE MANAGEMENT software. This Java-based application has 2 menu items.
One for adding and removing products, as shown in Figure 1. Another one for searching a product, as shown in Figure
2. You can store the data of products in a text file, or implement Serializable interface, or save an XML/ JSON object.
When a user adds a new product, the amount of this product is added to the current amount of the same product. When
a user removes a product by inputting product name and clicking on Remove button, the amount of this product is
decreased by 1. If the amount of a product is zero, this product is removed out of the database. You are free to re­
design the graphical user interface, but the functionality of the application has to be kept unchanged.

Product Name Product List


Amount i.
1. Small Chair 3
Description 2. Big Chair 2
3. Table A 2

Add Remove

FIGURE 1. GUI for adding/removing Products

Product Name �' P r od u c t A_____� Search


______

Amount 5

Description This is a sample description

FIGURE 2. GUI for searching a product

You might also like