IMS Project Simbu Bro
IMS Project Simbu Bro
A Project Report
Submitted to Tamil Nadu Open University, Chennai
In partial fulfilment for
The award of the degree
Submitted By
SILAMBARASAN B
Enrolment Number: 221117200230
for the award of the Degree in Computer Applications/ Computer Science of Tamil Nadu Open
University, Chennai 600015. This report or part of this report has not been submitted earlier either to
this University or to any other University / Institution for the fulfilment of the requirement of a
Place:
Date:
DECLARATION
Chennai would like to declare that the dissertation entitled INVENTORY MANAGEMENT
SYSTEM submitted by me in partial fulfillment of the requirements for the award of the Degree
Place:
1. PROJECT DESCRIPTION
The Inventory Management System (IMS) is developed to
assist businesses in managing their inventory effectively and
efficiently. The primary functions of this system include
tracking inventory levels, processing orders, managing sales
and purchases, and generating insightful reports. This
desktop application is designed to provide a user-friendly
interface for users to interact with various functionalities,
ensuring smooth operations in managing stock and
improving overall business productivity.
2. REQUIREMENT SPECIFICATION
Functional Requirements
1. User Management
User Login
• The system shall allow users to log in with a username
and password.
• The system shall authenticate users against stored
credentials.
User Roles
• The system shall support different user roles (e.g.,
Admin, Manager, Staff).
• The system shall restrict access to certain functionalities
based on user roles.
2. Inventory Management
Add Inventory Item
• The system shall allow users to add new inventory items
with details such as name, category, quantity, supplier,
and price.
Update Inventory Item
• The system shall allow users to update details of existing
inventory items.
Delete Inventory Item
• The system shall allow users to delete inventory items.
View Inventory Items
• The system shall display a list of all inventory items with
details.
3. Stock Management
Track Stock Levels
• The system shall track the stock levels of each inventory
item.
• The system shall notify users when stock levels fall
below a predefined threshold.
4. Order Management
Process Orders
• The system shall allow users to create, update, and
delete orders.
• The system shall update inventory stock levels when
orders are processed.
Order History
• The system shall maintain a history of all processed
orders.
5. Supplier Management
Add Supplier
• The system shall allow users to add new suppliers with
details such as name, contact information, and address.
Update Supplier
• The system shall allow users to update details of existing
suppliers.
Delete Supplier
• The system shall allow users to delete suppliers.
View Suppliers
• The system shall display a list of all suppliers with
details.
6. Customer Management
Add Customer
• The system shall allow users to add new customers with
details such as name, contact information, and address.
Update Customer
• The system shall allow users to update details of existing
customers.
Delete Customer
• The system shall allow users to delete customers.
View Customers
• The system shall display a list of all customers with
details.
7. Sales Management:
Record sales transactions.
Generate invoices and receipts.
8. Purchase Management:
Track purchases from suppliers.
Update inventory based on received goods.
9. Reporting
Generate Reports
• The system shall generate reports on inventory levels,
order history, and supplier details.
Export Reports
• The system shall allow users to export reports in various
formats (e.g., PDF, Excel).
Non-Functional Requirements:
1. Usability:
- User-friendly interface with intuitive navigation.
- Responsive design for different screen resolutions.
2. Performance:
- Fast data retrieval and processing.
- Handle concurrent users efficiently.
3. Security:
- Secure login with encrypted passwords.
- Data integrity and confidentiality.
4. Maintainability:
- Modular code structure for easy maintenance and
updates.
- Well-documented code and user manual.
3. ARCHITECTURAL DESIGN
1. System Architecture
• Presentation Layer
• Database Layer
2. Presentation Layer
This layer is responsible for the user interface (UI) and user
experience (UX). It can be a web-based interface or a desktop
application. For a web-based UI, you might use:
5. Database Layer
Class Diagram:
+--------------------+
Key Classes:
LoginForm Class
import javax.swing.;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
public LoginForm() {
setSize(300, 150);
setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
setLocationRelativeTo(null);
add(panel);
placeComponents(panel);
loginButton.addActionListener(new ActionListener() {
@Override
authenticateUser();
}
});
}
panel.setLayout(null);
panel.add(userLabel);
panel.add(usernameField);
panel.add(passwordLabel);
passwordField = new JPasswordField(20);
panel.add(passwordField);
panel.add(loginButton);
if (DatabaseManager.authenticate(username,
password)) {
new Dashboard().setVisible(true);
this.dispose();
} else {
JOptionPane.showMessageDialog(this, "Invalid
credentials!");
DatabaseManager Class
import java.sql.;
PreparedStatement ps =
connection.prepareStatement("SELECT FROM users WHERE
username = ? AND password = ?")) {
ps.setString(1, username);
ps.setString(2, password);
return rs.next();
} catch (SQLException e) {
e.printStackTrace();
return false;
PreparedStatement ps =
connection.prepareStatement("INSERT INTO items (name,
quantity, price) VALUES (?, ?, ?)")) {
ps.setString(1, item.getName());
ps.setInt(2, item.getQuantity());
ps.setDouble(3, item.getPrice());
ps.executeUpdate();
} catch (SQLException e) {
e.printStackTrace();
PreparedStatement ps =
connection.prepareStatement("UPDATE items SET name = ?,
quantity = ?, price = ? WHERE id = ?")) {
ps.setString(1, item.getName());
ps.setInt(2, item.getQuantity());
ps.setDouble(3, item.getPrice());
ps.setInt(4, item.getId());
ps.executeUpdate();
} catch (SQLException e) {
e.printStackTrace();
PreparedStatement ps =
connection.prepareStatement("DELETE FROM items WHERE
id = ?")) {
ps.setInt(1, id);
ps.executeUpdate();
} catch (SQLException e) {
e.printStackTrace();
}
public static Item getItem(int id) {
PreparedStatement ps =
connection.prepareStatement("SELECT FROM items WHERE
id = ?")) {
ps.setInt(1, id);
if (rs.next()) {
} catch (SQLException e) {
e.printStackTrace();
return null;
}
while (rs.next()) {
items.add(new Item(rs.getInt("id"),
rs.getString("name"), rs.getInt("quantity"),
rs.getDouble("price")));
} catch (SQLException e) {
e.printStackTrace();
return items;
}
}
Item Class
this.id = id;
this.name = name;
this.quantity = quantity;
this.price = price;
Dashboard Class
import javax.swing.;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
public Dashboard() {
setSize(800, 600);
setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
setLocationRelativeTo(null);
inventoryMenu.add(addItemMenuItem);
inventoryMenu.add(viewItemsMenuItem);
menuBar.add(inventoryMenu);
setJMenuBar(menuBar);
addItemMenuItem.addActionListener(new
ActionListener() {
@Override
new AddItemForm().setVisible(true);
});
viewItemsMenuItem.addActionListener(new
ActionListener() {
@Override
new ViewItemsForm().setVisible(true);
}
});
AddItemForm Class
import javax.swing.;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
public AddItemForm() {
setTitle("Add New Item");
setSize(300, 200);
setDefaultCloseOperation(JFrame.DISPOSE_ON_CLOSE);
setLocationRelativeTo(null);
add(panel);
placeComponents(panel);
addButton.addActionListener(new ActionListener() {
@Override
addItem();
});
}
private void placeComponents(JPanel panel) {
panel.setLayout(null);
panel.add(nameLabel);
panel.add(nameField);
panel.add(quantityLabel);
panel.add(priceLabel);
panel.add(priceField);
panel.add(addButton);
DatabaseManager.addItem(item);
this.dispose();
ViewItemsForm Class
import javax.swing.;
import javax.swing.table.DefaultTableModel;
import java.util.List;
public class ViewItemsForm extends JFrame {
public ViewItemsForm() {
setTitle("View Items");
setSize(500, 400);
setDefaultCloseOperation(JFrame.DISPOSE_ON_CLOSE);
setLocationRelativeTo(null);
tableModel.addRow(rowData);
add(scrollPane);
}
5. Testing Procedures
Unit Testing
import org.junit.jupiter.api.Test;
@Test
DatabaseManager.addItem(item);
Item retrievedItem =
DatabaseManager.getItem(item.getId());
assertEquals(10, retrievedItem.getQuantity());
@Test
DatabaseManager.addItem(item);
item.setName("Updated Item");
DatabaseManager.updateItem(item);
Item retrievedItem =
DatabaseManager.getItem(item.getId());
@Test
DatabaseManager.addItem(item);
DatabaseManager.deleteItem(item.getId());
Item retrievedItem =
DatabaseManager.getItem(item.getId());
assertNull(retrievedItem);
}
Integration Testing
System Testing
1. User Authentication
When the user runs the application, the login form
appears. The user enters their credentials and logs in.
Login successful!
Choose an option: 1
3. Viewing Items
Next, the user decides to view all items in the inventory.
Choose an option: 2
View Items
----------
ID | Name | Quantity | Price
-----------------------------------
1 | Widget A | 50 | Rs.19.99
4. Generating a Report
The user then generates a report to see the current
inventory status.
Choose an option: 3
Generating Report...
---------------------
Inventory Report
-----------------
ID | Name | Quantity | Price
-----------------------------------
1 | Widget A | 50 | $19.99
5. Logging Out
Finally, the user logs out of the system.