A console-based C++ application designed to help small electronics shops manage their inventory, billing, and daily operations efficiently. This system supports item management (add/update/delete), sales processing, and persistent storage using binary files—all wrapped in a password-protected interface.
You can quickly start the project in Gitpod by clicking the button below:
- Features
- Demo
- Getting Started
- Login Credentials
- How It Works
- Code Structure
- Technologies Used
- Limitations
- Contributing
- Author
- License
- 🔐 Password Protected Access
- ➕ Add new electronic items
- 📋 Display all items in inventory
- 🔍 Search items by name
- ✏️ Update item details (name, price, quantity)
- ❌ Delete item from inventory
- 🧾 Generate customer bills based on purchases
- 💾 Persistent storage using file I/O (binary format)
- 🧠 Simple and intuitive menu-driven interface
When you run the program successfully and log in, you'll see a menu like this:
1. Add Item
2. Show All Items
3. Search Item
4. Delete Item
5. Update Item
6. Generate Bill
7. Exit
- C++ compiler (e.g.,
g++) - Terminal or Command Prompt
-
Clone this repository or download the file
Electronic_Shop.cpp. -
Open terminal and compile the source code:
g++ Electronic_Shop.cpp -o ElectronicShop
Run the compiled program:
./ElectronicShopTo prevent unauthorized access, the system requires authentication.
- Username:
admin - Password:
123
You can customize these credentials directly in the source code.
Each item stored includes:
Item Code: A unique identifierItem Name: Name of the electronic productPrice: Price per unitQuantity: Quantity available
These are stored in a binary file (itemstore.dat) for persistence.
- User is prompted to input item name and quantity
- If available, total cost is calculated and shown
- Final bill with itemized breakdown is displayed
| Section | Description |
|---|---|
main() |
Entry point with login & menu loop |
class item |
Contains item data and methods like add(), show(), search(), etc. |
| File operations | Binary file handling for saving and retrieving item data |
| Authentication | Basic user login system with validation |
| UI elements | Text-based menu system and status messages |
- Language: C++
- File I/O: Binary file handling (
fstream) - Data Handling: Classes and objects
- Interface: Console/Terminal
- Not cross-platform GUI — terminal only
- Passwords stored in plain text
- No input validation or error recovery for file corruption
- No database integration
Pull requests are welcome! If you have suggestions for improvements:
- Fork the repository
- Create your branch (
git checkout -b feature-branch) - Commit your changes (
git commit -m 'Add new feature') - Push to the branch (
git push origin feature-branch) - Open a pull request
Developed by Aabhas Mishra
This project is open-source and free to use for educational or learning purposes.