A simple web-based Mall Billing and Inventory Management System built using Java and Object-Oriented Programming (OOP).
I developed this project to understand how Java concepts can be used to solve real-world problems. The application helps manage products, maintain stock, and generate customer bills through a browser-based interface.
📌 About the Project
Managing products and calculating bills manually can become difficult, especially when there are multiple products and different product categories.
To make this process easier, I built this application where users can view available products, add new products, update stock, import inventory, and generate bills.
One of the main goals of this project was to implement Java OOP concepts in a practical application and connect the Java backend with a simple web interface.
✨ Features
- View Products and Stock: Check available products, their prices, and current stock.
- Add Products: Add new grocery and electronic products to the inventory.
- Import Stock: Increase the quantity of existing products.
- Update Stock: Modify product stock whenever required.
- Generate Bills: Select products, enter quantities, and calculate the bill automatically.
- Discount Calculation: Apply discounts based on the billing amount.
- Web Interface: Access the application through a web browser.
🛠️ Technologies Used
| Technology | Purpose |
|---|---|
| Java | Backend development |
| OOP | Application structure and logic |
| HTML | Web page structure |
| CSS | Styling the interface |
| Java HttpServer | Handling browser requests |
| Docker | Application containerization |
| Render | Cloud deployment |
📂 Project Structure
java_project/
│
├── Product.java
├── Grocery.java
├── Electronics.java
├── Mall.java
├── Bill.java
├── MallWebServer.java
│
├── Dockerfile
├── .dockerignore
└── README.md
🧠 Java Concepts Implemented
While developing this project, I worked with the following OOP concepts:
- Encapsulation: Keeping product data private and accessing it through methods.
- Inheritance: Using
GroceryandElectronicsas child classes ofProduct. - Abstraction: Defining common product behaviour through an abstract class.
- Polymorphism: Managing different product categories using a common parent class.
I also used Java collections, exception handling, and HTTP request handling.
🚀 How to Run Locally
Prerequisites
- Java JDK 21 or compatible version
- VS Code or any Java IDE
- Git (optional)
- Clone the repository
git clone https://github.com/vikasbb06/java_project.git- Navigate to the project folder
cd java_project- Compile the Java files
javac *.java- Run the application
java MallWebServer- Open in your browser
http://localhost:8080
The application should now be accessible through your browser.
☁️ Deployment
The project is configured for Docker-based deployment on Render.
The Dockerfile handles Java compilation and starts the web server. The application reads the port from the environment, allowing it to run in a cloud hosting environment.
📚 What I Learned
Building this project helped me understand how individual Java classes work together in a larger application.
I got practical experience with:
- Designing applications using OOP principles.
- Connecting Java backend logic with a browser interface.
- Managing products and inventory.
- Handling HTTP requests using Java.
- Working with Git and GitHub.
- Preparing a Java application for Docker-based deployment.
🔮 Future Improvements
There are several things I would like to improve as I continue working on this project:
- Integrate a database for permanent product and stock storage.
- Add admin and customer login functionality.
- Maintain previous billing records.
- Improve the user interface.
- Add sales reports and inventory analytics.
This project is part of my learning journey in Java, Object-Oriented Programming, and backend development. I plan to keep improving it as I learn new technologies.