Skip to content

Latest commit

 

History

195 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Inventory Manager

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.


Authors

  • Uche Ogudu
  • Mark Matti
  • Menas Gebremedhin

Program Overview

This Inventory Manager allows users to manage both digital and physical products efficiently through a graphical interface. Users can:

  • Load products from a .csv file 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

Key Features

  • 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

Class Information

Reader.java

Handles reading and parsing product information from a CSV file into usable product objects.

Writer.java

Handles saving the current product list to a file using either Save or Save As operations.

ProductManager.java

Contains core data logic and analysis methods used in the app. Calculates profit margins, revenue, and sorts top/bottom 5 lists.

MainController.java

Manages the primary GUI, handling button presses, menu interactions, error-checking, and view updates.

AddController.java

Controls the form used to add new products. Ensures user input is properly handled and validated.

Product.java

Defines both Digital and Physical products. Stores product attributes and includes comparators for analysis sorting (e.g., by sales, inventory, revenue, profit margin).


Running the Program

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)

  1. make sure that Java is installed (Java Development Kit 24 works) and JavaFX sdk is also installed (24.0.1 works)
  2. Locate where the java fx sdk is installed, and get the root path to the lib file within it
  3. Open cmd
  4. In cmd, move to the directory that contains the jar file using cd
  5. 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:

  1. Make sure that Java is installed (Java Development Kit 24 works fine).
  2. Download and install the JavaFX SDK (version 23.0.2 or similar).
  3. Locate where the JavaFX SDK is installed, and find the path to the lib folder inside it.
  4. Open Terminal.
  5. Navigate to the directory containing your JAR file using the cd command.
  6. 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

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages