The goal of this project was to implement a catalog program for items in Java, which can be used through a CLI (command-line interface).
Specifically, this catalog has been made for clothing items.
First, compile the program with the command :
make
Then, launch the generated executable with the following command :
./a.out
You can also generate and run a
.jar
file directly instead, with the commandmake runjar
. You can find other available Makefile commands here
This will automatically launch the CLI. Here's how to use it :
./a.out
Products loaded successfully
> <OPTION>
OPTIONS:
add : create and add a product (asks for item type, color, size...etc)
delete : delete a product (asks for the product ID)
list : list all the products
exit : exit the CLI
The program uses object persistence using Java's ObjectOutputStream
and ObjectInputStream
, automatically saving created products to a file ("data.dat") when exiting. It also loads data from ("data.dat") file if it exists upon launch.
You can also find this diagram in XMI format here
This project is licensed under the Apache 2.0 License - see the LICENSE file for details.