MICROPROJECT REPORT ON
“ONLINE SHOPPING MANAGEMENT USING JAVA”
IN PARTIAL FULFILMENT OF DIPLOMA IN INFORMATION TECHNOLOGY
(Fourth Semester)
In the Subject of
“JAVA PROGRAMMING”
AFFILIATED TO
MAHARASHTRA STATE BOARD OF TECHNICAL EDUCATION ,
MUMBAI
Submitted in partial fulfilment of the requirement of the diploma of Information
Technology
GROUP MEMBERS
Sr.No. NAME ENROLLMENT NO.
1. PRANAY JADHAV 23112230391
2. ASHMIT NAGAONKAR 23112230413
3. GANESH DESHMUKH 23112230422
4. DHANESH VISHE 24112230424
GUIDED BY
Mrs. Dikshika Meher
G. V. ACHARYA POLYTECHNIC, SHELU
ACADEMIC YEAR
2024-2025
MAHARASHTRA STATE BOARD OF TECHNICAL EDUCATION,
MUMBAI
CERTIFICATE
This is to certify that,
The Students of Fourth Semester of Diploma in INFORMATION TECHNOLOGY at
G.V.ACHARYA POLYTECHNIC,SHELU has completed the Micro Project
satisfactorily in Subject Java Programming in the academic year 2024-2025,as per the
MSBTE prescribed curriculum of K Scheme.
Place:-Shelu EnrollmentNo.:-23112230391
23112230413
23112230422
24112230424
Date:- / / Exam Seat No.:-
Project Guide Head of the Department Principal
Mrs.Dikshika Mrs.Madhura Mrs.Madhura
Meher Mahindrakar Mahindrakar
MAHARASHTRA STATE BOARD OF TECHNICAL EDUCATION,
MUMBAI
CERTIFICATE
This is to certify that Mr.Pranay Rajendra Jadhav,
Enrollment No.23112230391 of Fourth Semester of Diploma in INFORMATION
TECHNOLOGY at G.V.ACHARYA POLYTECHNIC,SHELU has completed the Micro
Project satisfactorily in Subject Java Programming in the academic year 2024-2025,as per
the MSBTE prescribed curriculum of K Scheme.
Place:-Shelu EnrollmentNo.:-23112230391
Date:- / / Exam Seat No.:-
Project Guide Head of the Department Principal
Mrs.Dikshika Mrs.Madhura Mrs.Madhura
Meher Mahindrakar Mahindrakar
MAHARASHTRA STATE BOARD OF TECHNICAL EDUCATION,
MUMBAI
CERTIFICATE
This is to certify that Mr.Ashmit Sandeep Nagaonkar,
Enrollment No.23112230413 of Fourth Semester of Diploma in INFORMATION
TECHNOLOGY at G.V.ACHARYA POLYTECHNIC,SHELU has completed the Micro
Project satisfactorily in Subject Java Programming in the academic year 2024-2025,as per
the MSBTE prescribed curriculum of K Scheme.
Place:-Shelu EnrollmentNo.:-23112230413
Date:- / / Exam Seat No.:-
Project Guide Head of the Department Principal
Mrs.Dikshika Mrs.Madhura Mrs.Madhura
Meher Mahindrakar Mahindrakar
MAHARASHTRA STATE BOARD OF TECHNICAL EDUCATION,
MUMBAI
CERTIFICATE
This is to certify that Mr.Ganesh Sanjay Deshmukh,
Enrollment No.23112230422 of Fourth Semester of Diploma in INFORMATION
TECHNOLOGY at G.V.ACHARYA POLYTECHNIC,SHELU has completed the Micro
Project satisfactorily in Subject Java Programming in the academic year 2024-2025,as per
the MSBTE prescribed curriculum of K Scheme.
Place:-Shelu EnrollmentNo.:-23112230422
Date:- / / Exam Seat No.:-
Project Guide Head of the Department Principal
Mrs.Dikshika Mrs.Madhura Mrs.Madhura
Meher Mahindrakar Mahindrakar
MAHARASHTRA STATE BOARD OF TECHNICAL EDUCATION,
MUMBAI
CERTIFICATE
This is to certify that Mr.Dhanesh Prakash Vishe,
Enrollment No.24112230424 of Fourth Semester of Diploma in INFORMATION
TECHNOLOGY at G.V.ACHARYA POLYTECHNIC,SHELU has completed the Micro
Project satisfactorily in Subject Java Programming in the academic year 2024-2025,as per
the MSBTE prescribed curriculum of K Scheme.
Place:-Shelu EnrollmentNo.:-24112230424
Date:- / / Exam Seat No.:-
Project Guide Head of the Department Principal
Mrs.Dikshika Mrs.Madhura Mrs.Madhura
Meher Mahindrakar Mahindrakar
DECLARATION
I under signed hereby declare that the micro project report entitled
"Online Shopping Management". I further declare that contents of this
report are properly citied and well acknowledge. This present report is not
submitted to any other examination of this or any other institute for the
award of any diploma.
Place : Shelu
Date:
Signature of Student
1.
2.
3.
4.
ACKNOWLEDGEMENT
We extend our special thanks to all teaching and non-teaching staff. Success is
nourished under the combination of perfect guidance, care and blessing.
Acknowledgement is the best way to convey Last few years spend in estimated
institution has moulded us into confident and aspiring engineers. We express our
sense of gratitude towards our project guide Mrs. Dikshika Meher. It is because of
her valuable guidance, analytical approach encouragement that we could learn, work
and complete the project. We will always cherish great experience work under the
enthusiastic guidance.
We are also grateful to our principal and our vice principal who not only supported us
in our project but also encouraged for every creative activity. We also sincerely give
thanks to our head of department Mrs.Madhura Mahindrakar of computer and its
sector, friends and well-wishers to directly or indirectly contribute for the success of
our maiden mission.
INDEX
SR.NO. TITLE PAGE NO.
1. INTRODUCTION 1
2. METHODOLOGY 2
3. CODE 4
4. OUTPUT 15
5. CONCLUSION 12
6. FUTURE SCOPE 17
7. REFERENCES 20
INTRODUCTION
Online shopping is a form of electronic commerce which allows consumers to directly
buy goods or services from a seller over the Internet using a web browser or a mobile
app. Consumers find a product of interest by visiting the website of the retailer directly
or by searching among alternative vendors using a shopping search engine, which
displays the same product's availability and pricing at different e-retailers. As of
2020, customers can shop online using a range of different computers and devices,
including desktop computers, laptops, tablet computers and smartphones.
An online shop evokes the physical analogy of buying products or services at a
regular "brick-and-mortar" retailer or shopping center; the process is called business-to-
consumer (B2C) online shopping. When an online store is set up to enable businesses to
buy from another businesses, the process is called business-to-business (B2B) online
shopping. A typical online store enables the customer to browse the firm's range of
products and services, view photos or images of the products, along with information
about the product specifications, features and prices. Unlike physical stores which may
close at night, online shopping portals are always available to customers.
Online stores usually enable shoppers to use "search" features to find specific models,
brands or items. Online customers must have access to the Internet and a valid method
of payment in order to complete a transaction, such as a credit card, an Interac-
enabled debit card, or a service such as PayPal. For physical products (e.g., paperback
books or clothes), the e-tailor ships the products to the customer; for digital products,
such as digital audio files of songs or software, the e-tailor usually sends the file to the
customer over the Internet. The largest of these online retailing corporations
are Alibaba, Amazon.com, and eBay.
Alternative names for the activity are "e-tailing", a shortened form of "electronic retail"
or "e-shopping", a shortened form of "electronic shopping". An online store may also be
called an e-web-store, e-shop, e-store, Internet shop, web-shop, web-store, online store,
online storefront and virtual store. Mobile commerce (or m-commerce) describes
purchasing from an online retailer's mobile device-optimized website or software
application ("app"). These websites or apps are designed to enable customers to browse
through a companies' products and services on tablet computers and smartphones.
1
METHODOLOGY
Online shopping management involves a multi-faceted approach to ensure smooth
operations, customer satisfaction, and business growth. Here's a breakdown of key
methodologies:
1. Customer Relationship Management (CRM)
Centralized Data: A robust CRM system is essential to store and manage
customer information, purchase history, preferences, and interactions.
Personalized Experience: Utilize customer data to tailor marketing campaigns,
product recommendations, and offers. This fosters loyalty and repeat business.
Customer Service: Efficiently handle customer inquiries, complaints, and
returns through various channels like email, chat, and phone support.
2. Inventory Management
Real-time Tracking: Maintain accurate stock levels to prevent overselling and
fulfill orders promptly.
Demand Forecasting: Analyze sales trends and historical data to anticipate
future demand and optimize inventory levels.
Efficient Order Fulfillment: Streamline order processing, packaging, and
shipping to ensure timely delivery.
3. E-commerce Platform Management
User-friendly Interface: Ensure a seamless and intuitive shopping experience
for customers.
Search Engine Optimization (SEO): Optimize website content and structure to
improve search engine rankings and drive organic traffic.
Marketing and Promotions: Utilize various marketing channels like email,
social media, and paid advertising to reach target audiences.
4. Logistics and Shipping
Reliable Shipping Partners: Partner with reputable shipping carriers to ensure
timely and cost-effective delivery.
Order Tracking: Provide customers with real-time order tracking information to
enhance transparency and build trust.
Returns Management: Establish clear return policies and efficient processes for
handling returns and exchanges.
5. Payment Processing
Secure Payment Gateways: Integrate secure payment gateways to protect
sensitive customer information.
Multiple Payment Options: Offer various payment options like credit cards,
debit cards, digital wallets, and cash on delivery to cater to diverse customer
preferences.
2
Fraud Prevention: Implement fraud detection mechanisms to prevent fraudulent
transactions.
6. Data Analytics
Website Analytics: Track website traffic, user behavior, and conversion rates to
identify areas for improvement.
Sales Analysis: Analyze sales data to identify top-selling products, customer
demographics, and seasonal trends.
Competitor Analysis: Monitor competitor activities, pricing strategies, and
marketing campaigns to gain a competitive edge.
7. Customer Feedback and Reviews
Gather Feedback: Actively solicit customer feedback through surveys, reviews,
and social media interactions.
Analyze Feedback: Analyze customer feedback to identify areas for
improvement and address customer concerns.
Respond to Feedback: Respond promptly and professionally to customer
feedback and reviews to demonstrate customer-centric approach.
By effectively implementing these methodologies, online businesses can enhance
customer satisfaction, optimize operations, and drive sustainable growth in the
competitive e-commerce landscape.
3
CODE
import java.util.ArrayList;
import java.util.HashMap;
import java.util.Map;
import java.util.Scanner;
class User {
private String username;
private String password;
private ArrayList<Order> orders;
public User(String username, String password) {
this.username = username;
this.password = password;
this.orders = new ArrayList<>();
}
public String getUsername() {
return username;
}
public boolean checkPassword(String password) {
return this.password.equals(password);
}
public void addOrder(Order order) {
orders.add(order);
}
public ArrayList<Order> getOrders() {
return orders;
}
}
class Product {
private String name;
private String description;
private double price;
private int stock;
public Product(String name, String description, double price, int stock)
{
this.name = name;
this.description = description;
this.price = price;
this.stock = stock;
}
public String getName() {
return name;
}
public String getDescription() {
4
return description;
}
public double getPrice() {
return price;
}
public int getStock() {
return stock;
}
public void adjustStock(int amount) {
this.stock += amount;
}
@Override
public String toString() {
return name + " - " + description + " - $" + price + " - Stock: " +
stock;
}
}
class Cart {
private Map<Product, Integer> items;
public Cart() {
items = new HashMap<>();
}
public void addItem(Product product, int quantity) {
if (product.getStock() >= quantity) {
items.put(product, items.getOrDefault(product, 0) + quantity);
product.adjustStock(-quantity); // Reduce stock
System.out.println(quantity + " x " + product.getName() + " added
to cart.");
} else {
System.out.println("Insufficient stock for product: " +
product.getName());
}
}
public void removeItem(Product product) {
if (items.containsKey(product)) {
int quantity = items.remove(product);
product.adjustStock(quantity); // Restock the product
System.out.println(product.getName() + " removed from the
cart.");
} else {
System.out.println("Product not found in cart.");
}
}
5
public void viewCart() {
if (items.isEmpty()) {
System.out.println("Your cart is empty.");
} else {
System.out.println("Items in your cart:");
for (Map.Entry<Product, Integer> entry : items.entrySet()) {
Product product = entry.getKey();
int quantity = entry.getValue();
System.out.println("- " + product.getName() + " x " + quantity
+ " @ $" + product.getPrice() + " each");
}
System.out.println("Total: $" + calculateTotal());
}
}
public double calculateTotal() {
double total = 0;
for (Map.Entry<Product, Integer> entry : items.entrySet()) {
total += entry.getKey().getPrice() * entry.getValue();
}
return total;
}
public Map<Product, Integer> getItems() {
return items;
}
public void clearCart() {
for (Map.Entry<Product, Integer> entry : items.entrySet()) {
entry.getKey().adjustStock(entry.getValue()); // Restock items
}
items.clear();
System.out.println("Cart has been cleared.");
}
}
class Order {
private Map<Product, Integer> items;
private double totalCost;
private String orderDate;
public Order(Map<Product, Integer> items, double totalCost, String
orderDate) {
this.items = items;
this.totalCost = totalCost;
this.orderDate = orderDate;
}
public Map<Product, Integer> getItems() {
6
return items;
}
public double getTotalCost() {
return totalCost;
}
public String getOrderDate() {
return orderDate;
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("Order Date: ").append(orderDate).append("\n");
for (Map.Entry<Product, Integer> entry : items.entrySet()) {
sb.append("- ").append(entry.getKey().getName())
.append(" x ").append(entry.getValue())
.append(" @ $").append(entry.getKey().getPrice())
.append(" each\n");
}
sb.append("Total Cost: $").append(totalCost);
return sb.toString();
}
}
class ProductDatabase {
private static ArrayList<Product> products = new ArrayList<>();
static {
products.add(new Product("Laptop", "Dell Inspiron 15", 799.99,
10));
products.add(new Product("Smartphone", "Apple iPhone 13",
999.99, 15));
products.add(new Product("Headphones", "Bose Noise Cancelling",
299.99, 20));
}
public static ArrayList<Product> getProducts() {
return products;
}
public static void addProduct(Product product) {
products.add(product);
}
public static void removeProduct(Product product) {
products.remove(product);
}
public static Product getProductByIndex(int index) {
if (index >= 0 && index < products.size()) {
7
return products.get(index);
}
return null;
}
}
public class ECommerceApp {
private static ArrayList<User> users = new ArrayList<>();
private static ArrayList<User> admins = new ArrayList<>();
private static Scanner scanner = new Scanner(System.in);
public static void main(String[] args) {
admins.add(new User("admin", "admin123"));
int choice;
while (true) {
System.out.println("\nWelcome to the Online Shopping System");
System.out.println("1. User Login");
System.out.println("2. User Registration");
System.out.println("3. Admin Login");
System.out.println("4. Exit");
System.out.print("Enter your choice: ");
choice = getIntInput();
switch (choice) {
case 1:
userLogin();
break;
case 2:
userRegistration();
break;
case 3:
adminLogin();
break;
case 4:
System.out.println("Thank you for using the Online
Shopping System. Goodbye!");
scanner.close();
return;
default:
System.out.println("Invalid choice. Please try again.");
}
}
}
private static void userRegistration() {
System.out.print("Enter desired username: ");
String username = scanner.nextLine();
8
if (isUsernameTaken(username)) {
System.out.println("Username already taken. Please choose
another one.");
return;
}
System.out.print("Enter desired password: ");
String password = scanner.nextLine();
users.add(new User(username, password));
System.out.println("Registration successful! You can now log in.");
}
private static void userLogin() {
System.out.print("Enter username: ");
String username = scanner.nextLine();
System.out.print("Enter password: ");
String password = scanner.nextLine();
User user = findUser(username, password);
if (user != null) {
System.out.println("Login successful!");
userMenu(user);
} else {
System.out.println("Invalid username or password.");
}
}
private static void adminLogin() {
System.out.print("Enter admin username: ");
String username = scanner.nextLine();
System.out.print("Enter admin password: ");
String password = scanner.nextLine();
User admin = findAdmin(username, password);
if (admin != null) {
System.out.println("Admin login successful!");
adminMenu(admin);
} else {
System.out.println("Invalid admin credentials.");
}
}
private static void userMenu(User user) {
Cart cart = new Cart();
int choice;
while (true) {
System.out.println("\nUser Menu");
System.out.println("1. View Products");
System.out.println("2. Add Product to Cart");
9
System.out.println("3. View Cart");
System.out.println("4. Checkout");
System.out.println("5. View Order History");
System.out.println("6. Logout");
System.out.print("Enter your choice: ");
choice = getIntInput();
switch (choice) {
case 1:
viewProducts();
break;
case 2:
addProductToCart(cart);
break;
case 3:
cart.viewCart();
break;
case 4:
checkout(user, cart);
break;
case 5:
viewOrderHistory(user);
break;
case 6:
System.out.println("Logging out...");
return;
default:
System.out.println("Invalid choice.");
}
}
}
private static void adminMenu(User admin) {
int choice;
while (true) {
System.out.println("\nAdmin Menu");
System.out.println("1. View Products");
System.out.println("2. Add New Product");
System.out.println("3. Remove Product");
System.out.println("4. Logout");
System.out.print("Enter your choice: ");
choice = getIntInput();
switch (choice) {
case 1:
viewProducts();
10
break;
case 2:
addNewProduct();
break;
case 3:
removeProduct();
break;
case 4:
System.out.println("Admin logging out...");
return;
default:
System.out.println("Invalid choice.");
}
}
}
private static void viewProducts() {
System.out.println("\nAvailable Products:");
ArrayList<Product> products = ProductDatabase.getProducts();
for (int i = 0; i < products.size(); i++) {
System.out.println("(" + (i + 1) + ") " + products.get(i));
}
}
private static void addProductToCart(Cart cart) {
viewProducts();
System.out.print("Enter the number of the product to add to cart: ");
int productIndex = getIntInput() - 1;
Product product =
ProductDatabase.getProductByIndex(productIndex);
if (product != null) {
System.out.print("Enter quantity: ");
int quantity = getIntInput();
cart.addItem(product, quantity);
} else {
System.out.println("Invalid product selection.");
}
}
private static void checkout(User user, Cart cart) {
if (cart.getItems().isEmpty()) {
System.out.println("Your cart is empty.");
return;
}
cart.viewCart();
System.out.print("Proceed to checkout? (yes/no): ");
11
String choice = scanner.nextLine();
if (choice.equalsIgnoreCase("yes")) {
double total = cart.calculateTotal();
String orderDate = java.time.LocalDateTime.now().toString();
Order order = new Order(new HashMap<>(cart.getItems()), total,
orderDate);
user.addOrder(order);
cart.clearCart();
System.out.println("Order placed successfully!");
System.out.println("Total cost: $" + total);
} else {
System.out.println("Checkout cancelled.");
}
}
private static void viewOrderHistory(User user) {
ArrayList<Order> orders = user.getOrders();
if (orders.isEmpty()) {
System.out.println("You have no previous orders.");
} else {
System.out.println("\nYour Orders:");
for (Order order : orders) {
System.out.println(order);
System.out.println("------------");
}
}
}
private static void addNewProduct() {
System.out.print("Enter product name: ");
String name = scanner.nextLine();
System.out.print("Enter product description: ");
String description = scanner.nextLine();
System.out.print("Enter product price: ");
double price = getDoubleInput();
System.out.print("Enter stock quantity: ");
int stock = getIntInput();
Product product = new Product(name, description, price, stock);
ProductDatabase.addProduct(product);
System.out.println("Product added successfully!");
}
private static void removeProduct() {
viewProducts();
System.out.print("Enter the number of the product to remove: ");
int productIndex = getIntInput() - 1;
12
Product product =
ProductDatabase.getProductByIndex(productIndex);
if (product != null) {
ProductDatabase.removeProduct(product);
System.out.println("Product removed successfully.");
} else {
System.out.println("Invalid product selection.");
}
}
private static User findUser(String username, String password) {
for (User user : users) {
if (user.getUsername().equals(username) &&
user.checkPassword(password)) {
return user;
}
}
return null;
}
private static User findAdmin(String username, String password) {
for (User admin : admins) {
if (admin.getUsername().equals(username) &&
admin.checkPassword(password)) {
return admin;
}
}
return null;
}
private static boolean isUsernameTaken(String username) {
for (User user : users) {
if (user.getUsername().equals(username)) {
return true;
}
}
for (User admin : admins) {
if (admin.getUsername().equals(username)) {
return true;
}
}
return false;
}
private static int getIntInput() {
while (true) {
try {
13
int input = Integer.parseInt(scanner.nextLine().trim());
return input;
} catch (NumberFormatException e) {
System.out.print("Please enter a valid integer: ");
}
}
}
private static double getDoubleInput() {
while (true) {
try {
double input = Double.parseDouble(scanner.nextLine().trim());
return input;
} catch (NumberFormatException e) {
System.out.print("Please enter a valid number: ");
}
}
}
}
14
OUTPUT
CONCLUSION
In conclusion, effective online shopping management is crucial for success in today's
competitive e-commerce landscape. It requires a multifaceted approach that
encompasses robust logistics, seamless customer service, and a strong understanding
of customer behavior and market trends.
By prioritizing user experience, leveraging technology, and maintaining a data-driven
approach, businesses can optimize their online operations, build customer loyalty, and
achieve sustainable growth in the digital marketplace.
Key Takeaways:
Customer Focus: Understanding customer needs and preferences is paramount.
Technological Innovation: Embracing emerging technologies like AI and
automation can streamline operations and enhance the shopping experience.
Data-Driven Decisions: Analyzing data on customer behavior, sales trends, and
market insights is essential for informed decision-making.
Adaptability: The e-commerce landscape is constantly evolving, so businesses
must be agile and adaptable to stay competitive.
17
FUTURE SCOPE
The future of online shopping management is poised for significant transformation,
driven by several key trends:
Artificial Intelligence (AI) and Machine Learning (ML):
Personalized Experiences: AI will power hyper-personalized recommendations,
tailoring product suggestions, pricing, and promotions to individual customer
preferences and behaviors.
Chatbots and Virtual Assistants: AI-powered chatbots will provide 24/7
customer support, answer queries, and even assist with the purchasing process.
Fraud Detection: ML algorithms will enhance fraud detection capabilities,
protecting both businesses and customers from fraudulent activities.
Inventory Management: AI-driven predictive analytics will optimize inventory
levels, minimizing stockouts and reducing holding costs.
Multichannel Experiences:
Seamless Integration: Online and offline channels will converge, creating a
unified shopping experience. Customers will be able to browse online, try
products in-store, and return items through their preferred channel.
Click-and-Collect: This option will continue to grow, allowing customers to
order online and pick up their purchases at a convenient location.
Social Commerce: Social media platforms will increasingly integrate shopping
features, blurring the lines between social interaction and e-commerce.
Mobile Commerce (m-commerce):
Mobile-First Approach: Mobile devices will remain the dominant platform for
online shopping, necessitating a mobile-first approach to website design and user
experience.
Voice Search and AI Assistants: Voice-activated shopping will gain traction,
with customers using voice commands to search for products, place orders, and
track deliveries.
Augmented Reality (AR) and Virtual Reality (VR): These technologies will
enhance the online shopping experience by allowing customers to visualize
products in their own space or try them on virtually.
Sustainability and Ethical Sourcing:
Eco-Friendly Practices: Consumers are increasingly demanding sustainable and
ethical products. Businesses will need to prioritize eco-friendly packaging,
carbon-neutral shipping, and ethical sourcing practices.
Transparency: Consumers will expect greater transparency regarding the
environmental and social impact of products and businesses.
18
Blockchain Technology:
Supply Chain Transparency: Blockchain can enhance supply chain
transparency, allowing customers to trace the origin and journey of products.
Secure Payments: Blockchain can facilitate secure and efficient online payments,
reducing the risk of fraud and data breaches.
These trends will reshape the landscape of online shopping management, requiring
businesses to adapt and innovate to stay competitive. By embracing AI, prioritizing
customer experience, and focusing on sustainability, businesses can thrive in the
evolving world of e-commerce.
19
REFERENCES
https://www.geeksforgeeks.org/e-commerce/
https://en.wikipedia.org/wiki/E-commerce
20