AJP MicroprojectReport
AJP MicroprojectReport
TYCO – C
Fifth Semester (2023-2024)
Group – 26
Page No.1
Certificate
Maharashtra State Board Of Technical Education
This is to certify that the following group of students roll nos.168-170 of 5thSemester
of Diploma in Computer Engineering of institute, THAKUR POLYTECHNIC
(Code:0522) has completed Micro-Project satisfactory in subject – Advance Java
Programming (22517) for the academic year 2023-2024 as prescribed in curriculum.
Place: Mumbai
Date:
Institution Seal
Page No.2
ACKNOWLEDGEMENT
We owe our deep gratitude and are also very thankful to our guide H.O.D Ms. Vaishali
Rane & Mrs. Nilam Parmar who has proven to be more than just a mere guide to
us. Apart from bringing to us what can be joy of successful completion of this project
was only possible due to her guidance and co-operation without which this work
would never have been completed.
Finally, we wish to express our deep sense of respect and gratitude to each and every
staff member who has helped us in many ways and also our parents who have always
bared with us in any critical situation and to all others, sparing their time and helping
us for completion of this project in whatever way they could. And lastly, we are grateful
to each other member of our group. Thank you!
Page No.3
PROPOSAL
Page No.4
Micro-Project Proposal
A micro-project helps the students to develop skills specific to collaborative efforts, allowing
students to tackle more complex problems then they could do on their own.
3. Proposed Methodology-
To complete this micro-project of Advance Java Programming, the procedure that we will
follow is given below –
Collection of Information
Coordination with necessary ethics
Group Discussion
References from books and internet websites.
Execution of project.
Preparing report.
Presentation of project.
Project submission.
Page No.5
4. Action Plan
5. Resources Required
Page No.6
REPORT
Page No.7
Micro-Project Report
An online marketplace for local products provides a platform where local artisans, farmers,
and small businesses can sell their goods directly to consumers. This benefits both sellers and
buyers by expanding market reach beyond geographical limitations. For sellers, it opens up
new revenue streams and allows them to showcase unique, culturally specific items that may
not be available in mainstream markets. For buyers, it offers the convenience of discovering
and purchasing locally produced goods, often with a focus on sustainability, quality, and
supporting local economies. Additionally, such a marketplace can promote community
engagement and contribute to economic resilience by fostering small businesses.
4. Literature Review:
The literature on online marketplaces for local products highlights their role in supporting
regional economies and sustainable consumption by connecting producers directly with
consumers. These platforms enable local vendors to bypass traditional supply chains, offering
greater profitability and trust through transparency and traceability. Demand for locally
sourced goods is driven by consumers seeking authenticity, sustainability, and unique
products. Key challenges include scalability, logistics, and maintaining quality control, while
effective digital infrastructure and local branding are crucial for success. Despite the
challenges, online marketplaces offer valuable opportunities for local economies to grow and
thrive.
Page No.8
5. Actual Methodology Followed –
Sr. Details of Activity Planned Start Planned Name of
No. Date Finish Date Responsible
Team
Members
Page No.9
7. Output of the Microproject:
import
java.awt.BorderLayout;
import java.awt.Color;
import java.awt.Component;
import java.awt.Dimension;
import
java.awt.FlowLayout;
import java.awt.Font;
import java.awt.GridLayout;
import
java.awt.event.ActionEvent;
import
java.awt.event.ActionListener;
import java.awt.event.KeyEvent;
import
java.awt.event.KeyListener;
import java.util.ArrayList;
import java.util.List;
import
javax.swing.BorderFactory;
import javax.swing.Box;
import
javax.swing.BoxLayout;
import
javax.swing.ImageIcon;
import javax.swing.JButton;
import javax.swing.JFrame;
import javax.swing.JLabel;
import
javax.swing.JOptionPane;
import javax.swing.JPanel;
import
javax.swing.JScrollPane;
import
javax.swing.JTextField;
import
javax.swing.SwingConstants;
import
javax.swing.SwingUtilities;
public class Micro_Project extends
JFrame { public class SpectacleItem
{
private String name;
private String
imagePath; private int
quantity;
public SpectacleItem(String name, String imagePath, int
quantity) { this.name = name;
this.imagePath = imagePath;
this.quantity = quantity;
}
public String getName() {
return name;
}
public String getImagePath() {
return imagePath;
}
Page No.10
public int getQuantity() {
return quantity;
}
public void incrementQuantity()
{ quantity++;
}
}
Page No.11
New list to store cart items
private String text;
private JPanel
specListing;
String[][] specs = {{"John Jacobs", "Round",
"photos/spectacle1.png"},
{"Vincent Chase", "Cat Eye", "photos/spectacle2.jpeg"}, {"New
Balance", "Clubmaster", "photos/spectacle3.png"}, {"Carrera",
"Transparent", "photos/spectacle4.png"}, {"Fossil", "Blend Edit",
"photos/spectacle5.png"}, {"Rhapsody", "Air Clip On",
"photos/spectacle6.jpeg"}, {"Safari", "Air Flex",
"photos/spectacle7.png"},
{"Rich Acetate", "Retro Aviator", "photos/spectacle8.jpeg"}};
public Micro_Project() {
setTitle("Online Spectacle
Shop"); setBounds(300, 100,
1200, 800);
getContentPane().setBackground(new Color(152, 115, 172));
setLayout(new BorderLayout());
Page No.13
public void keyPressed(KeyEvent e)
{ text = searchBar.getText();
System.out.println(text);
}
@Override
public void keyReleased(KeyEvent e) {
}
});
Component rigidSpace = Box.createRigidArea(new Dimension(10,
0)); JButton searchButton = new JButton("Search");
searchButton.setBackground(Color.WHITE);
searchButton.setForeground(Color.BLACK);
searchButton.setPreferredSize(new Dimension(120, 40));
searchButton.setBorderPainted(false);
searchButton.addActionListener(new ActionListener() {
@Override
public void actionPerformed(ActionEvent e)
{ String query = text.toLowerCase();
for (JPanel bookListing :
allSpecListings) { String title =
((JLabel) ((JPanel)
bookListing.getComponent(1)).getComponent(0)).getText().toLower
Case();
bookListing.setVisible(title.contains(query))
;
}
System.out.println(query);
}
});
JButton cartButton = new JButton("Cart");
cartButton.setBackground(Color.WHITE);
cartButton.setForeground(Color.BLACK);
cartButton.setPreferredSize(new Dimension(120, 40));
cartButton.setBorderPainted(false);
cartButton.addActionListener(new
ActionListener() { @Override
public void actionPerformed(ActionEvent e) {
// Show the CartDisplayScreen with the cart items.
new CartDisplayScreen(cartItems);
}
});
searchBarPanel.add(searchButton);
searchBarPanel.add(rigidSpace);
searchBarPanel.add(cartButton); // Add the cart
button searchPanel.add(searchBarPanel);
add(searchPanel, BorderLayout.NORTH);
add(bookScrollPane,
BorderLayout.CENTER);
setVisible(true);
setDefaultCloseOperation(EXIT_ON_CLO
SE);
}
private JPanel createSpecListing(String title, String
description, String imageName) {
JPanel specsListing = new JPanel();
specsListing.setBackground(Color.WHITE);
specsListing.setLayout(new BorderLayout());
Page No.14
ImageIcon specImage = new
Page No.15
ImageIcon(Micro_Project.class.getResource(imageName));
JLabel imageLabel = new JLabel(specImage);
specsListing.add(imageLabel,
BorderLayout.NORTH);
JPanel detailsPanel = new JPanel(new BorderLayout());
JLabel titleLabel = new JLabel(title, SwingConstants.CENTER);
titleLabel.setFont(new Font("Product Sans", Font.BOLD, 14));
detailsPanel.add(titleLabel, BorderLayout.NORTH);
buyButton.setBackground(Color.WHITE);
buyButton.setBorderPainted(false);
addToCartButton.setBackground(Color.WHITE)
; addToCartButton.setBorderPainted(false);
addToWishlistButton.setBackground(Color.WH
ITE);
addToWishlistButton.setBorderPainted(false
);
addToCartButton.addActionListener(new
ActionListener() { @Override
public void actionPerformed(ActionEvent e) {
// Check if the spectacle is already in the
cart. SpectacleItem existingItem =
findCartItem(title); if (existingItem !=
null) {
// If it's in the cart, increment the quantity.
existingItem.incrementQuantity();
} else {
// If it's not in the cart, add it as a new item with
quantity
1. cartItems.add(new SpectacleItem(title, imageName,
1));
}
JOptionPane.showMessageDialog(Micro_Project.this,
"Added to Cart: " + title);
}
});
buyButton.addActionListener(new
ActionListener() { @Override
public void actionPerformed(ActionEvent e) {
JOptionPane.showMessageDialog(Micro_Project.this,
"Button
Clicked: Buy Now");
}
});
addToWishlistButton.addActionListener(new ActionListener()
{ @Override
public void actionPerformed(ActionEvent e) {
JOptionPane.showMessageDialog(Micro_Project.this,
"Button
Page No.16
Clicked: Add To Wishlist");
}
});
buttonsPanel.add(buyButton);
buttonsPanel.add(addToCartButto
n);
Page No.17
buttonsPanel.add(addToWishlistButton);
specsListing.add(detailsPanel,
BorderLayout.CENTER);
specsListing.add(buttonsPanel,
BorderLayout.SOUTH);
return specsListing;
}
private SpectacleItem findCartItem(String
name) { for (SpectacleItem item :
cartItems) {
if (item.getName().equals(name)) {
return item;
}
}
return null;
}
Page No.18
quantityLabel.setFont(new Font("Product Sans",
Font.PLAIN,
16))
;
itemPanel.add(imageLabel);
itemPanel.add(itemLabel);
itemPanel.add(rigidSpace);
itemPanel.add(quantityLabe
l);
Page No.19
itemListPanel.add(itemPanel);
}
JScrollPane scrollPane = new JScrollPane(itemListPanel);
add(titleLabel,
BorderLayout.NORTH);
add(scrollPane,
BorderLayout.CENTER);
setVisible(true);
}
}
public class CartScreen extends JFrame {
private String selectedSpectacleName;
public CartScreen(String spectacleName) {
this.selectedSpectacleName = spectacleName;
setTitle("Cart");
setBounds(400, 200, 400, 300);
getContentPane().setBackground(Color.WHI
TE); setLayout(new BorderLayout());
JLabel titleLabel = new JLabel("Selected Spectacle: " +
selectedSpectacleName);
titleLabel.setFont(new Font("Product Sans", Font.BOLD,
20));
titleLabel.setHorizontalAlignment(SwingConstants.CENTER);
JButton addToCartButton = new JButton("Add to Cart");
addToCartButton.addActionListener(new ActionListener() {
@Override
public void actionPerformed(ActionEvent e) {
// Add the selected spectacle to the cart (you can
implement cart functionality here).
JOptionPane.showMessageDialog(CartScreen.this,
"Added to Cart: " + selectedSpectacleName);
}
});
JPanel panel = new JPanel();
panel.setLayout(new FlowLayout());
panel.add(addToCartButton);
add(titleLabel,
BorderLayout.NORTH); add(panel,
BorderLayout.CENTER);
setVisible(true);
}
}
public static void main(String[] args) {
SwingUtilities.invokeLater(Micro_Project::
new);
}
}
Page No.20
Page No.21
Page No.22
8. Skills Developed/Leaning Outcome:
Digital Literacy: Enhanced ability to navigate and utilize online marketplace
platforms effectively.
Entrepreneurial Skills: Improved understanding of business strategies and
marketing techniques for local product promotion.
Customer Engagement: Developed skills in building customer relationships and
managing feedback for service improvement.
Logistical Coordination: Gained insights into inventory management and logistics
to optimize product delivery.
9. Applications of Micro-Project:
Facilitating local product promotion and sales through online platforms.
Enhancing community engagement and capacity building among local vendors.
Driving economic development by fostering entrepreneurship and small business
growth.
Promoting sustainable practices by encouraging local sourcing and
responsible consumption
10. Conclusion:
In conclusion, online marketplaces for local products present significant opportunities for
economic growth, community engagement, and sustainable consumption. By bridging the
gap between local vendors and consumers, these platforms not only enhance visibility and
accessibility but also foster a sense of community and support for local economies.
However, to fully realize their potential, stakeholders must address challenges such as
logistics, quality control, and digital literacy among vendors. With the right strategies and
support, online marketplaces can play a pivotal role in revitalizing local economies and
promoting sustainable practices, benefiting both producers and consumers alike.
11. Bibliography
Page No.23