An inventory manager that allows you to load, save delete, add, modify or analyse a list of products and their wholesale price, retail price, inventory quantity, number of sales, product category, and unique product code for each product.
- Uche Ogudu
- Mark Matti
- Menas Gebremedhin
This Inventory Manager allows users to manage both digital and physical products efficiently through a graphical interface. Users can:
- Load products from a
.csvfile containing:- Product name
- Wholesale price
- Retail price
- Inventory quantity
- Number of sales
- Product category
- Unique product code
- Add new products manually via a dedicated form
- Modify or delete existing products
- Save changes or create a new product file via Save/Save As
- Perform a variety of analysis functions to evaluate performance
- Load products from file
- Add new products (overwrites existing ones with same product code)
- Modify already existing product data
- Delete selected products using backspace or delete key
- Save or Save As functionality
- Switch between Digital and Physical product lists
- In-depth analysis:
- Product Revenue
- Product Profit Margin
- Top/Bottom 5 Products for revenue, sales (shows total revenue for the most sold products, to get quantity sold filter within the table), and profit margin
- Overall Revenue, Profits/Losses, Profit Margin
- Recommended items to go on sale (physical products only)
- can also adjust the table, sort within the table, add or remove columns
Handles reading and parsing product information from a CSV file into usable product objects.
Handles saving the current product list to a file using either Save or Save As operations.
Contains core data logic and analysis methods used in the app. Calculates profit margins, revenue, and sorts top/bottom 5 lists.
Manages the primary GUI, handling button presses, menu interactions, error-checking, and view updates.
Controls the form used to add new products. Ensures user input is properly handled and validated.
Defines both Digital and Physical products. Stores product attributes and includes comparators for analysis sorting (e.g., by sales, inventory, revenue, profit margin).
The program can load files through the GUI, or the user can input the file they would like to load as a command-line arguement (filename.csv) and the program will attempt to load that file when it starts
If using the IDE, just run rw/app/cpsc233projectui/mainApplication.java (enter the file name as a command line arguement here)
Otherwise, if using the jar file (if on Windows)
- make sure that Java is installed (Java Development Kit 24 works) and JavaFX sdk is also installed (24.0.1 works)
- Locate where the java fx sdk is installed, and get the root path to the lib file within it
- Open cmd
- In cmd, move to the directory that contains the jar file using cd
- Use the command: java --module-path "C:\Program Files\Java\javafx-sdk-24.0.1\lib" --add-modules javafx.controls,javafx.fxml -jar CPSC233ProjectUI.jar This path ^ (C:\Program Files.....) will be the javafx sdk lib path
If on Mac:
- Make sure that Java is installed (Java Development Kit 24 works fine).
- Download and install the JavaFX SDK (version 23.0.2 or similar).
- Locate where the JavaFX SDK is installed, and find the path to the lib folder inside it.
- Open Terminal.
- Navigate to the directory containing your JAR file using the cd command.
- Run the following command (replacing the path with your actual JavaFX lib path): java --module-path "/path/to/javafx-sdk-23.0.2/lib" --add-modules javafx.controls,javafx.fxml -jar CPSC233PROJECTUI.jar