Kunal Java PBL
Kunal Java PBL
COFFEE SHOP
PBL Project
by
Aman Tomar (BCAN1CA22097)
Sanaya Sharma (BCAN1CA22110)
Harsh Sharma (BCAN1CA22140)
(November 2023)
2|Page
3|Page
Contents
Abstract… ................................................................................................................................... 1
Introduction… ............................................................................................................................ 3
Future scope…............................................................................................................................ 5
Conclusion… .............................................................................................................................. 6
Source code………………………………………………………………………………….....8
References… ............................................................................................................................... 9
4|Page
INTRODUCTION
1.1 Project Background:-
"Café BDU Billing System" is the system for manage the cafe
business. The main point of developing this system is to help
cafe administrator to manage the cafe business and help
customer for online ordering and billing system.
So, Café BDU Billing System will develop to help the cafe
administrator to manage cafe management and for customer to
make their online ordering and billing. Other than that, this
project is to upgrade the manual system and make the business
easily to access and systematic.
5|Page
The Coffee Shop GUI, with its modular structure and planned
enhancements, offers businesses a cost-effective solution for
digitalizing their ordering process. This can lead to increased
operational efficiency, improved customer satisfaction, and
potentially expanded revenue streams through better service and
customization options.
Future Scope:-
1. User Authentication: Enhance security by implementing user authentication mechanisms for staff or
personalized user accounts.
2. Order Customization: Allow users to customize their orders, such as choosing size, toppings, or
special instructions.
3. Payment Processing: Integrate a payment system for a complete ordering and transaction experience.
4. Database Integration: Implement a database to store order history, enabling features like order
tracking and customer preferences.
5. Improved UI Design: Enhance the visual appeal and user experience through better design practices.
6. Error Handling Refinement: Further refine error handling and input validation to ensure a robust and
user-friendly application.
7|Page
Conclusion:_
Source code:-
import javax.swing;
import javax.swing.table.DefaultTableModel;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import java.text.DecimalFormat;
public CoffeeShopGUI() {
setTitle("Coffee Shop");
setSize(600, 400);
setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
setLocationRelativeTo(null);
setVisible(true);
}
// Menu Table
String[] menu Columns = {"Item", "Cost (₹)"};
Object[][] menu Data = {
{"Espresso", 120.0},
{"Latte", 150.0},
{"Cappuccino", 170.0},
{"Americano", 100.0},
{"Mocha", 200.0},
{"Macchiato", 180.0}
// Add more dishes as needed
};
Default Table Model menu Model = new
DefaultTableModel(menu Data, menu Columns);
JTable menuTable = new JTable(menu Model);
menuTable.setBounds(50, 40, 250, 150);
JScrollPane menuScrollPane = new
JScrollPane(menuTable);
menuScrollPane.setBounds(50, 40, 250, 150);
panel.add(menuScrollPane);
panel.add(receiptLabel);
// Receipt Table
String[] receiptColumns = {"Item", "Quantity", "Total Cost
(₹)"};
DefaultTableModel receiptModel = new
DefaultTableModel(null, receiptColumns);
JTable receiptTable = new JTable(receiptModel);
JScrollPane receiptScrollPane = new
JScrollPane(receiptTable);
receiptScrollPane.setBounds(50, 230, 500, 100);
panel.add(receiptScrollPane);
orderButton.addActionListener(new ActionListener() {
@Override
public void actionPerformed(ActionEvent e) {
int selectedRow = menuTable.getSelectedRow();
if (selectedRow == -1) {
JOptionPane.showMessageDialog(null, "Please
select an item from the menu.", "Error",
JOptionPane.ERROR_MESSAGE);
return;
}
totalCost += orderTotal;
Project result :-
13 | P a g e
Youtube:- https://youtu.be/p3SQXnxRVm8?si=Loa7NHtN5BcR0i0D
Google :- https://www.google.com
Chatgpt :- https://chat.openai.com