This project is a simple Java program that allows you to register a product, update its stock quantity (add or remove units), and display the updated product data.
- π₯ Register a product (name, price, and stock quantity).
- β Add products to stock.
- β Remove products from stock.
- π Display updated product information.
src/
βββ application/
β βββ Program.java
βββ entities/
βββ Product.java- `Program.java`: contains the main logic (input handling and operations).
- `Product.java`: class representing the product and its operations. Enter product data:
Name: Notebook
Price: 1200.00
Quantity in stock: 10
Product data: Notebook, $1200.00, 10 units, Total: $12000.00
Enter the number of products to be added in stock: 5
Updated data: Notebook, $1200.00, 15 units, Total: $18000.00
Enter the number of products to be removed from stock: 3
Updated data: Notebook, $1200.00, 12 units, Total: $14400.00- Clone this repository:
git clone https://github.com/your-username/java-product-system.git- Compile the files:
javac application/Program.java entities/Product.java- Run the program
java application.ProgramProgram : Dr.Nelio Alves - Udemy Class