Skip to content

Latest commit

 

History

3 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 

Repository files navigation

Supermarket Management System — Java

A console-based Supermarket Management System developed using Java. This project demonstrates fundamental Java programming concepts such as arrays, loops, conditional statements, user input, and arithmetic operations through a simple supermarket billing application.

Java Language Project Status

Overview

This project is a simple console-based supermarket management and billing program created using Core Java.

The application simulates a basic supermarket environment where product details and customer purchases are processed using Java programming logic. It uses arrays to store product-related information, loops to process multiple items, and user input to interact with the application.

The project was developed to strengthen understanding of Core Java fundamentals while implementing a practical real-world use case.

Features

  • Product information handling
  • Product price management
  • Quantity-based purchase calculation
  • Customer input through the console
  • Automatic bill calculation
  • Array-based data storage
  • Loop-based item processing
  • Conditional logic
  • Simple and beginner-friendly console interface
  • Real-world application of Core Java concepts

Program Workflow

Start
  |
  v
Display Product Information
  |
  v
Accept Customer Input
  |
  v
Select Product
  |
  v
Enter Quantity
  |
  v
Calculate Item Cost
  |
  v
Process Purchase
  |
  v
Calculate Total Bill
  |
  v
Display Final Amount
  |
  v
End

How the Program Works

Step 1 - Initialize Product Data

The program stores product-related information using Java arrays.

Step 2 - Display Available Products

The available supermarket products and their corresponding prices are processed by the program.

Step 3 - Accept User Input

The user provides the required information through the console using Java's Scanner class.

Step 4 - Process Product Selection

The program identifies the selected product and processes the required quantity.

Step 5 - Calculate Item Cost

The cost of each item is calculated based on its price and quantity.

Item Cost = Product Price × Quantity

Step 6 - Calculate Total Bill

The cost of multiple purchased items is combined to calculate the final bill amount.

Step 7 - Display Result

The final calculated amount is displayed to the customer through the console.

Tech Stack

Layer Technology
Programming Language Java
Programming Concepts Arrays, Loops, Conditions
Input Handling Scanner
Data Storage Java Arrays
Interface Console
Development Environment VS Code / IntelliJ IDEA / Eclipse

Java Concepts Used

This project demonstrates several important Core Java concepts:

  • Variables and data types
  • Arrays
  • for loops
  • while loops
  • Conditional statements
  • Arithmetic operations
  • User input
  • Scanner class
  • Basic control flow
  • Problem-solving and logical thinking

Repository Structure

Supermarket---Java---Program/
|
|-- README.md
|
|-- main.java
|

main.java

Contains the complete Java source code for the supermarket management and billing program.

Installation

Prerequisites

Before running this project, make sure you have:

  • Java Development Kit (JDK) installed
  • Java compiler available in the system PATH
  • A Java-compatible IDE or terminal
  • Basic knowledge of running Java programs

Check Java Installation

Open your terminal or command prompt and run:

java --version

You can also verify the Java compiler:

javac --version

Run the Project

1. Clone the Repository

git clone https://github.com/harshineeshree/Supermarket---Java---Program.git

2. Navigate to the Project

cd Supermarket---Java---Program

3. Compile the Program

javac main.java

4. Run the Program

java main

Usage

  1. Start the Java program.
  2. View the available supermarket products.
  3. Enter the required product information.
  4. Enter the required quantity.
  5. The program calculates the item cost.
  6. Continue processing the required items.
  7. The program calculates the total purchase amount.
  8. View the final bill amount in the console.

Example Workflow

Supermarket
-------------------------
Product 1
Product 2
Product 3
Product 4
-------------------------

Enter your choice:
Enter quantity:

Processing purchase...

-------------------------
Total Amount: ₹XXXX
-------------------------

The exact output depends on the values entered while running the program.

Learning Objectives

The main objective of this project is to apply fundamental Java programming concepts to a practical real-world problem.

Through this project, I gained practical experience in:

  • Writing Java programs from scratch
  • Working with arrays
  • Using loops for repetitive operations
  • Handling user input
  • Performing mathematical calculations
  • Implementing conditional logic
  • Developing console-based applications
  • Converting real-world requirements into programming logic

Example Use Cases

This project can serve as a foundation for:

  • Supermarket billing systems
  • Grocery store billing applications
  • Product management systems
  • Small retail applications
  • Console-based inventory projects
  • Java programming practice projects
  • Beginner-level database projects

Future Improvements

The current version focuses on Core Java fundamentals. The project can be further enhanced by adding:

  • Customer registration and management
  • Product search functionality
  • Inventory management
  • Stock availability tracking
  • Admin and cashier login
  • Product addition and deletion
  • Product update functionality
  • Discount and coupon management
  • GST/tax calculation
  • Detailed invoice generation
  • Multiple payment methods
  • MySQL database integration
  • Java Swing or JavaFX GUI
  • Sales history and reports
  • Receipt generation

Security & Data Notes

This project currently uses local Java data structures and does not require external credentials or APIs.

If database functionality or user authentication is added in future versions, sensitive information such as:

  • Database passwords
  • API keys
  • Authentication credentials
  • Customer information

should not be committed to GitHub.

Project Status

Completed — Core Java Version

The current version successfully demonstrates the basic supermarket management and billing logic using Core Java.

Author

G Harshinee Shree

B.Tech — Artificial Intelligence & Data Science

Topics

  • Java
  • Core Java
  • Java Programming
  • Arrays
  • Loops
  • Console Application
  • Supermarket Management
  • Billing System
  • Beginner Java Project
  • Programming Fundamentals

Support

If you found this project useful, consider giving the repository a Star on GitHub.

Feel free to explore the code, suggest improvements, or use the project as a reference for learning Core Java.

About

Console-based Supermarket Management System built with Core Java using arrays, loops, conditional statements, and user input to manage products and calculate bills.

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages