AJP Part B 1
AJP Part B 1
Subject
Advanced Java Programming (22517)
Guided By :-
Mr.G.J.Solanke
Micro-Project Topic
Submitted By
Sr.no Roll.no Enrollment No. Name
1 22 2212410230 Gonarkar Sarvar A.
1
MAHARASHTRA STATE
BOARD OF TECHNICAL EDUCATION
Certificate
This is to Verify That
Mr./Ms……………………………………………................Roll No…….…..…of
Fifth Semester of Diploma in …………...Information Technology……………of
Institute……………Government Polytechnic Murtizapur…..………………..
Title of Microproject
1.0 Rationale
The Cafe Management System simplifies billing and order management in cafes, ensuring
accuracy and efficiency. By automating calculations, incorporating VAT, and offering a user-
friendly interface, it reduces manual workload and enhances the overall customer experience.
This project highlights the importance of technology in streamlining business operations.
2.0 Aims/Benefits of the Micro-Project
To design and implement a secure and user-friendly Cafe Management System that automates billing,
enhances operational efficiency, and provides a seamless experience for users.
Benefits
Automates Billing: Simplifies the process of calculating total bills, taxes, and discounts.
User-Friendly Interface: Ensures ease of use through an intuitive GUI built with Java Swing.
Time-Saving: Reduces manual calculations, allowing faster service for customers.
Cost-Effective: Minimizes errors and operational inefficiencies.
Customizable: Allows easy adaptation for specific business needs.
Educational Value: Enhances understanding of Java programming, GUI design, and backend
integration.
3.0 Course Outcomes Addressed (Add to the earlier list if more COs are addressed)
Research into management systems for small businesses, such as cafes, highlights the importance of
automation in streamlining daily operations. Key findings from previous studies and similar projects
include:
3
Efficiency in Operations: Automated billing systems eliminate manual errors and reduce the time
required for calculations.
Role of GUI Frameworks: Java Swing is widely used for developing user-friendly, platform-
independent graphical interfaces, making it suitable for small-scale business applications.
Cost Accuracy: Systems that incorporate tax calculations and discount options enhance
transparency and trust between businesses and customers.
Usability Challenges: Successful systems prioritize simplicity in design, ensuring even non-
technical users can operate them effectively.
The Cafe Management System project was developed in a systematic and collaborative manner. The
steps followed are detailed below:
4
Code Implementation
import javax.swing.*;
import java.awt.*;
import java.awt.event.*;
JTextField usernameField;
JPasswordField passwordField;
JTextArea receiptArea;
JTextArea totalSalesArea;
public CafeManagementSystem() {
setTitle("Cafe Management System");
setSize(700, 600);
setDefaultCloseOperation(EXIT_ON_CLOSE);
mainPanel.add(createLoginPanel(), "Login");
5
mainPanel.add(createMenuPanel(), "Menu");
mainPanel.add(createReceiptPanel(), "Receipt");
mainPanel.add(createTotalSalesPanel(), "TotalSales");
add(mainPanel);
}
gbc.gridx = 0; gbc.gridy = 1;
panel.add(passLabel, gbc);
gbc.gridx = 1;
panel.add(passwordField, gbc);
return panel;
}
6
JLabel espressoLabel = new JLabel("Espresso (₹50):");
espressoField = new JTextField("0");
panel.add(tableLabel);
panel.add(tableField);
panel.add(latteLabel);
panel.add(latteField);
panel.add(espressoLabel);
panel.add(espressoField);
panel.add(cappuccinoLabel);
panel.add(cappuccinoField);
panel.add(teaLabel);
panel.add(teaField);
7
panel.add(coffeeLabel);
panel.add(coffeeField);
panel.add(hotChocolateLabel);
panel.add(hotChocolateField);
panel.add(muffinLabel);
panel.add(muffinField);
panel.add(croissantLabel);
panel.add(croissantField);
panel.add(sandwichLabel);
panel.add(sandwichField);
panel.add(pastryLabel);
panel.add(pastryField);
panel.add(juiceLabel);
panel.add(juiceField);
panel.add(totalSalesButton);
panel.add(nextButton);
return panel;
}
panel.add(scrollPane, BorderLayout.CENTER);
panel.add(buttonPanel, BorderLayout.SOUTH);
return panel;
}
8
JButton backButton = new JButton("Back to Menu");
backButton.addActionListener(e -> cardLayout.show(mainPanel, "Menu"));
return panel;
}
9
double tax = subtotal * TAX_RATE;
double total = subtotal + tax;
totalSales += total;
receiptArea.setText(
"Table Number: " + tableNumber + "\n" +
"=============================\n" +
"Latte: " + latteQty + " x ₹" + LATTE_PRICE + " = ₹" + (latteQty * LATTE_PRICE) +
"\n" +
"Espresso: " + espressoQty + " x ₹" + ESPRESSO_PRICE + " = ₹" + (espressoQty *
ESPRESSO_PRICE) + "\n" +
"Cappuccino: " + cappuccinoQty + " x ₹" + CAPPUCCINO_PRICE + " = ₹" +
(cappuccinoQty * CAPPUCCINO_PRICE) + "\n" +
"Tea: " + teaQty + " x ₹" + TEA_PRICE + " = ₹" + (teaQty * TEA_PRICE) + "\n" +
"Coffee: " + coffeeQty + " x ₹" + COFFEE_PRICE + " = ₹" + (coffeeQty *
COFFEE_PRICE) + "\n" +
"Hot Chocolate: " + hotChocolateQty + " x ₹" + HOT_CHOCOLATE_PRICE + " = ₹" +
(hotChocolateQty * HOT_CHOCOLATE_PRICE) + "\n" +
"Muffin: " + muffinQty + " x ₹" + MUFFIN_PRICE + " = ₹" + (muffinQty *
MUFFIN_PRICE) + "\n" +
"Croissant: " + croissantQty + " x ₹" + CROISSANT_PRICE + " = ₹" + (croissantQty *
CROISSANT_PRICE) + "\n" +
"Sandwich: " + sandwichQty + " x ₹" + SANDWICH_PRICE + " = ₹" + (sandwichQty *
SANDWICH_PRICE) + "\n" +
"Pastry: " + pastryQty + " x ₹" + PASTRY_PRICE + " = ₹" + (pastryQty *
PASTRY_PRICE) + "\n" +
"Juice: " + juiceQty + " x ₹" + JUICE_PRICE + " = ₹" + (juiceQty * JUICE_PRICE) + "\n"
+
"=============================\n" +
"Subtotal: ₹" + String.format("%.2f", subtotal) + "\n" +
"Tax: ₹" + String.format("%.2f", tax) + "\n" +
"Total: ₹" + String.format("%.2f", total) + "\n"
);
cardLayout.show(mainPanel, "Receipt");
} catch (NumberFormatException e) {
JOptionPane.showMessageDialog(this, "Invalid input. Please enter valid quantities and table
number.", "Error", JOptionPane.ERROR_MESSAGE);
}
}
10
}
Required for
2 Software Java jdk 1.8.0 1 Java
runtime
Login Page
11
Home Page
Receipt Page
12
Total Selling Page
13
8.0 Skill Developed / Learning outcome of this Micro-Project
Developing an Online Examination System using Java Swing builds these key skills:
1. Java Programming: Core Java, OOP, GUI design, event handling.
2. UI/UX Design: User-friendly interface creation.
3. Problem-Solving: Logic building for navigation, scoring, and error handling.
4. Debugging: Identifying and fixing bugs.
5. Project Management: Task breakdown, deadlines, and collaboration (if in a team).
6. Testing: Ensuring functionality and reliability.
7. Communication: Explaining, documenting, and presenting the project.
The Cafe Management System has diverse applications across different domains:
14