Вы находитесь на странице: 1из 26

FAST FOOD

MANAGEMENT

Submitted By :
Name : Bableen Kaur
INTRODUCTION: -

The project named Fast Food Automation has been prepared by the
programmer, keeping in view the objective to make sure that all the needs of a Fast
Food Center should be taken care of. The Objective of creating the project is to
make whole of the manual work of the restaurant such as Adding of a new product
to the existing menu of products of the restaurant, Selling of a product to the
customer of the shop, maintaining a list of products available at the library,
preparing a bill for the products purchased by the customer etc. fully
computerized. The Scope of the project named Fast Food restaurant is very
wide. The programmer has prepared the project in such a manner that it can fulfill
the needs of any Fast Food restaurant be it be very small or very big. The project
can handle large number of customers at the same time. The user can add any
number of products to the existing list of products, and can maintain a long list of
products available with the restaurant without any difficulty. Products can be sold
to the customers and the bill can be generated for the products sold to the
customer. The software provides the scope for editing the details of products
available at the restaurant. The software also provides the scope for adding a new
product, and also modifying and deleting the existing products. It is very important
for creating a successful and robust project that the problem or need of the client
for which the project has to be developed should be clearly defined to the
programmer. Unless, the programmer does not clearly understand the problem for
the solution of which the project is to develop, he/she cannot develop successful
and bugs free software. Hence, relating to our project named Fast Food
Automation, the problem for the solution of which the project has been
developed is that of turning a big Fast Food Restaurant into a fully computerized
one.
PROBLEM DEFINITION

1. Before making this application, we assumed that a Restaurant which had


recently started its operations found it very difficult to handle their
customers.
2. It was due to their great customer service and efficient handling of daily
operations that they customer base started growing and in a day, they
started to handle lot of customer requests. The problem is that in manual
restaurant record keeping system, excessive staff employment is required,
extremely time consuming process is involved, inconveniences to both
customers as well as to the manager.
3. Slowly & slowly the count of such customers started to grow very rapidly
and the bank employees had to devote their maximum time in handling
such customers.
4. This resulted in large response times of the bank employees who found
themselves unable to give adequate time to some more important customers
like NRIs or people who were interested in opening a fresh account.
5. Slowly, the bank started loosing its important or gold customers due to poor
response times by the bank employees and they even started loosing those
customers whose requests could not be fulfilled.
6. After this, the bank decided to install a system that can effectively &
efficiently service the request of such customers and can the corresponding
work of its employees who were overburdened with such tasks.
7. This action was a step towards serving important or fresh customers with a
minimum possible and improve the response times & efficiency of the bank
employees.
OBJECTIVE: -

The Project named Fast Food automation has been developed using
the VB6.0 programming language. VB is still the language of choice for writing
large systems and is still the basis for most advanced programming projects.
Programmer has used VB language in a very efficient and effective way to
develop the interface of the project. All the coding of the project has been done in
Front-End VB language and Backend Access. The software has been prepared
with a theory of turning a manual Fast Food Restaurant into a fully
computerized one. The theory behind preparing the project is to make the user
easy to handle a large number of items in more efficient and effective way by
making it fully computerized. Keeping in view the needs and requirements of a
very large restaurant has developed the software. This statement can be proved by
the fact, that the programmer has given scope for adding a large number of items
to the project. Other needs of a large Fast Food Restaurant such as adding a new
item to the existing list of items, keeping record of products sold to the customers,
maintaining a list of large number of available items with the restaurant etc. have
also been take care off by the programmer while creating the project.
SCOPE :-
This project on fast food automation system tries to provide some amount of
automation in fast food restaurant system. The Scope of the project is to help
restaurant in making their business more efficient.
In the Fast-Food MANAGEMENT SYSTEM project, there are five
options such as: - PURCHASE, SEE MENU, EDIT, TOTAL BILL, EXIT. In this
project All Billing system is computerized. These module work properly. Like In
purchase item user purchase any item after showing food list. Second module
display the food list item , another module is Edit menu, In edit menu main user or
admin can update the food id , Item name, Rate , Description, Quantity .Third
module is Total bill, In this after purchased total bill automatically generate. Last
is EXIT module. In exit module come out in main window.

MODULES :-

Purchase Item
In purchase item user purchase any item after showing list of food. On Go,
validation for each text box is carried out and attention is focused on to respective
text box that does not meet validation requirement, thus chances of error are
eliminated.

See Menu
In this module, the system display the List of food with its description of rate.

Edit In Edit Module, Main Admin update the menu item like add the new item or edit,
delete the items like pizza, modify the rate etc. If Main user save the list without filling
the record then this page will display error.
Total Bill
After purchasing, Total bill will be automatically generated. In total bill, the Food name,
Quatity, Rate, and total amount would be mentioned.

EXIT
This module will be work of EXIT. If users processing work have finish .

SCREEN SHOTS

Home Page
CODING OF THE PROJECT

//**********************************************************
// PROJECT FAST-FOOD AUTOMATION
//**********************************************************

//**********************************************************
// INCLUDED HEADER FILES
//**********************************************************

Loginpage.java
private void jButton1ActionPerformed(java.awt.event.ActionEvent evt) {
String username = txtusername.getText();
String password = txtpassword.getText();
if(username.equals("")){
JOptionPane.showMessageDialog(null, "Please enter your user name!");
txtusername.requestFocusInWindow();
return;
}
if(password.equals("")){
JOptionPane.showMessageDialog(null, "Please enter your password!");
txtpassword.requestFocusInWindow();
return;
}
if(username.equals("admin") && password.equals("admin"))
{
home obj = new home();
obj.setVisible(true);
this.dispose();
}// TODO add your handling code here:
else
{
JOptionPane.showMessageDialog(null, "Your user id or password is wrong");
txtusername.requestFocusInWindow();
}
}
Home page

private void jButton3ActionPerformed(java.awt.event.ActionEvent evt) {


Edit obj = new Edit();
obj.setVisible(true);// TODO add your handling code here:
}

private void jButton1ActionPerformed(java.awt.event.ActionEvent evt) {


purchase obj = new purchase();
obj.setVisible(true);
this.dispose();
}

private void jButton2ActionPerformed(java.awt.event.ActionEvent evt) {


try
{
AllItemList obj1 = new AllItemList();
obj1.setVisible(true);
this.dispose();
}
catch(Exception e)
{
e.printStackTrace();
}

private void jButton4ActionPerformed(java.awt.event.ActionEvent evt) {


try
{
AllPurchaseBill obj = new AllPurchaseBill();
obj.setVisible(true);// TODO add your handling code here:
this.dispose();
}
catch(Exception e)
{
e.printStackTrace();
}
}
ADD ITEM

private void jButton14ActionPerformed(java.awt.event.ActionEvent evt) {


Edit obj = new Edit();
obj.setVisible(true);// TODO add your handling code here:
this.dispose();
}

private void jButton13ActionPerformed(java.awt.event.ActionEvent evt) {


String id = txtitemid.getText();
String name = txtitemname.getText();
String price = txtitemprice.getText();
if(id.equals("")){
JOptionPane.showMessageDialog(null, "Please enter product id!");
txtitemid.requestFocusInWindow();
return;
}
if(name.equals("")){
JOptionPane.showMessageDialog(null, "Please enter product name!");
txtitemname.requestFocusInWindow();
return;
}
if(price.equals("")){
JOptionPane.showMessageDialog(null, "Please enter product price!");
txtitemprice.requestFocusInWindow();
return;
}
try
{
Class.forName("java.sql.Driver");
Connection con = DriverManager.getConnection("jdbc:mysql://localhost:3306/fastfood",
"root", "root");
PreparedStatement ps = con.prepareStatement("insert into item values(?,?,?)");
ps.setString(1, id);
ps.setString(2, name);
ps.setString(3, price);
int i = ps.executeUpdate();
if(i>0)
{
JOptionPane.showMessageDialog(null, "Item inserted successfully!");
txtitemid.setText("");
txtitemname.setText("");
txtitemprice.setText("");
txtitemid.requestFocusInWindow();
}
else{
JOptionPane.showMessageDialog(null, "Item not inserted successfuly!");
}
}
catch(Exception ex)
{
JOptionPane.showMessageDialog(null, ex);
}
}
ALL item list
public class AllItemList extends javax.swing.JFrame {
private Vector<Vector<String>> data;
private Vector<String> header;

/** Creates new form AllItemList */

public AllItemList() throws Exception{


DBEngine dbengine = new DBEngine();
data = dbengine.getEmployee();
header = new Vector<String>();
header.add("ItemID");
header.add("ItemName");
header.add("ItemPrice");
initComponents();
}

private void formWindowOpened(java.awt.event.WindowEvent evt) {


// TODO add your handling code here:
}

private void jButton2ActionPerformed(java.awt.event.ActionEvent evt) {


this.dispose(); // TODO add your handling code here:
}

private void jButton1ActionPerformed(java.awt.event.ActionEvent evt) {


home obj = new home();
obj.setVisible(true);
this.dispose();// TODO add your handling code here:
}
public static void main(String args[]) {
java.awt.EventQueue.invokeLater(new Runnable() {
public void run() {
try
{
new AllItemList().setVisible(true);
}
catch(Exception e)
{
e.printStackTrace();
}
}
});
}
ALL PURCHASE PROCUCT

public class AllPurchaseBill extends javax.swing.JFrame {


private Vector<Vector<String>> data;
private Vector<String> header;
/** Creates new form AllPurchaseBill */
public AllPurchaseBill() throws Exception{
data = getEmployee();
header = new Vector<String>();
header.add("ItemID");
header.add("ItemName");
header.add("ItemPrice");
header.add("CustomerName");
header.add("Quentity");
header.add("Tottal Amount");
initComponents();
}
private void jButton1ActionPerformed(java.awt.event.ActionEvent evt) {
home obj = new home();
obj.setVisible(true);
this.dispose();// TODO add your handling code here:
}

private void jButton2ActionPerformed(java.awt.event.ActionEvent evt) {


this.dispose(); // TODO add your handling code here:
}

/**
* @param args the command line arguments
*/
public Vector getEmployee()throws Exception
{
Vector<Vector<String>> employeeVector = new Vector<Vector<String>>();

Class.forName("java.sql.Driver");
Connection con =
DriverManager.getConnection("jdbc:mysql://localhost:3306/fastfood", "root", "root");
PreparedStatement pre = con.prepareStatement("select * from purchase ");
ResultSet rs = pre.executeQuery();

while(rs.next())
{
Vector<String> employee = new Vector<String>();
employee.add(rs.getString(1)); //Empid
employee.add(rs.getString(2)); //name
employee.add(rs.getString(3)); //position
employee.add(rs.getString(4));
employee.add(rs.getString(5));
employee.add(rs.getString(6));
//employee.add(rs.getString(4)); //department
employeeVector.add(employee);
}

/*Close the connection after use (MUST)*/

return employeeVector;
}
public static void main(String args[]) {
java.awt.EventQueue.invokeLater(new Runnable() {
public void run() {
try
{
new AllPurchaseBill().setVisible(true);
}
catch(Exception e)
{
e.printStackTrace();
}
}
});
}

EDIT

private void jButton5ActionPerformed(java.awt.event.ActionEvent evt) {


this.dispose(); // TODO add your handling code here:
}

private void jButton4ActionPerformed(java.awt.event.ActionEvent evt) {


home obj = new home();
obj.setVisible(true);// TODO add your handling code here:
this.dispose();
}

private void jButton1ActionPerformed(java.awt.event.ActionEvent evt) {


AddItem obj = new AddItem();
obj.setVisible(true);
this.dispose();
}

private void jButton2ActionPerformed(java.awt.event.ActionEvent evt) {


ModifyItem obj = new ModifyItem();
obj.setVisible(true);
this.dispose();
}
private void jButton3ActionPerformed(java.awt.event.ActionEvent evt) {
ModifyItem obj = new ModifyItem();
obj.setVisible(true);
this.dispose(); // TODO add your handling code here:
}

Edit

private void jButton13ActionPerformed(java.awt.event.ActionEvent evt) {


String itemid = comitemid.getSelectedItem().toString();
String name = txtname.getText();
String price = txtprice.getText();

if(name.equals("")){
JOptionPane.showMessageDialog(null, "Please enter product name!");
txtname.requestFocusInWindow();
return;
}
if(price.equals("")){
JOptionPane.showMessageDialog(null, "Please enter product price!");
txtprice.requestFocusInWindow();
return;
}
try {

Class.forName("java.sql.Driver");
Connection con =
DriverManager.getConnection("jdbc:mysql://localhost:3306/fastfood", "root", "root");
PreparedStatement ps = con.prepareStatement("update item set ItemName =
'"+name+"', ItemPrice = '"+price+"' where ItemID = '"+itemid+"'");
int i = ps.executeUpdate();
if(i>0) {
JOptionPane.showMessageDialog(null, "ITEM UPDATED
SUCCESSFULLY!");

txtname.setText("");
txtprice.setText("");
comitemid.requestFocusInWindow();
} else{
JOptionPane.showMessageDialog(null, "ITEM NOT UPDATED
SUCCESSFULLY!");
}
} catch(Exception ex) {
JOptionPane.showMessageDialog(null, ex);
}
}

private void jButton14ActionPerformed(java.awt.event.ActionEvent evt) {


Edit obj = new Edit();
obj.setVisible(true);// TODO add your handling code here:
this.dispose();
}

private void formWindowOpened(java.awt.event.WindowEvent evt) {


try
{
Class.forName("java.sql.Driver");
Connection con =
DriverManager.getConnection("jdbc:mysql://localhost:3306/fastfood", "root", "root");
PreparedStatement ps = con.prepareStatement("select * from item");
ResultSet rs = ps.executeQuery();
while(rs.next())
{
comitemid.addItem(rs.getString(1));
}
}
catch(Exception ex)
{
JOptionPane.showMessageDialog(null, ex);
}
}

private void comitemidItemStateChanged(java.awt.event.ItemEvent evt) {


try
{
String itemid = comitemid.getSelectedItem().toString();
Class.forName("java.sql.Driver");
Connection con =
DriverManager.getConnection("jdbc:mysql://localhost:3306/fastfood", "root", "root");
PreparedStatement ps = con.prepareStatement("select * from item where Itemid =
'"+itemid+"'");
ResultSet rs = ps.executeQuery();
if(rs.next())
{
txtname.setText(rs.getString(2));
txtprice.setText(rs.getString(3));
}
}
catch(Exception ex)
{
JOptionPane.showMessageDialog(null, ex);
}
}

private void jButton15ActionPerformed(java.awt.event.ActionEvent evt) {


try
{
String itemid = comitemid.getSelectedItem().toString();
Class.forName("java.sql.Driver");
Connection con =
DriverManager.getConnection("jdbc:mysql://localhost:3306/fastfood", "root", "root");
PreparedStatement ps = con.prepareStatement("delete from item where Itemid =
'"+itemid+"'");
int i = ps.executeUpdate();
if(i>0) {
JOptionPane.showMessageDialog(null, "ITEM DELETED
SUCCESSFULLY!");

txtname.setText("");
txtprice.setText("");
comitemid.requestFocusInWindow();
} else{
JOptionPane.showMessageDialog(null, "ITEM NOT DELETED
SUCCESSFULLY!");
}
}
catch(Exception ex)
{
JOptionPane.showMessageDialog(null, ex);
}
}

Purch

private void jButton2ActionPerformed(java.awt.event.ActionEvent evt) {


home obj = new home();
obj.setVisible(true);// TODO add your handling code here:
this.dispose();
}

private void formWindowOpened(java.awt.event.WindowEvent evt) {


try
{
Class.forName("java.sql.Driver");
Connection con =
DriverManager.getConnection("jdbc:mysql://localhost:3306/fastfood", "root", "root");
PreparedStatement ps = con.prepareStatement("select * from item");
ResultSet rs = ps.executeQuery();
while(rs.next())
{
comitemid.addItem(rs.getString(1));
}
}
catch(Exception ex)
{
JOptionPane.showMessageDialog(null, ex);
} // TODO add your handling code here:
}

private void comitemidItemStateChanged(java.awt.event.ItemEvent evt) {


try
{
String itemid = comitemid.getSelectedItem().toString();
Class.forName("java.sql.Driver");
Connection con =
DriverManager.getConnection("jdbc:mysql://localhost:3306/fastfood", "root", "root");
PreparedStatement ps = con.prepareStatement("select * from item where Itemid =
'"+itemid+"'");
ResultSet rs = ps.executeQuery();
if(rs.next())
{
txtname.setText(rs.getString(2));
txtprice.setText(rs.getString(3));
txtcustname.requestFocusInWindow();
}
}
catch(Exception ex)
{
JOptionPane.showMessageDialog(null, ex);
}
}

private void txtquantityActionPerformed(java.awt.event.ActionEvent evt) {


float price = Float.parseFloat(txtprice.getText());
float quantity = Float.parseFloat(txtquantity.getText());
float tottalamount = price * quantity;
txttottalamount.setText(Float.toString(tottalamount));

private void jButton1ActionPerformed(java.awt.event.ActionEvent evt) {


String id = comitemid.getSelectedItem().toString();
String itemname = txtname.getText();
float price = Float.parseFloat(txtprice.getText());
String custname = txtcustname.getText();
float quantity = Float.parseFloat(txtquantity.getText());
float amount = Float.parseFloat(txttottalamount.getText());
try
{

Class.forName("java.sql.Driver");
Connection con = DriverManager.getConnection("jdbc:mysql://localhost:3306/fastfood",
"root", "root");
PreparedStatement ps = con.prepareStatement("insert into purchase values(?,?,?,?,?,?)");
ps.setString(1, id);
ps.setString(2, itemname);
ps.setFloat(3, price);
ps.setString(4, custname);
ps.setFloat(5, quantity);
ps.setFloat(6, amount);
int i = ps.executeUpdate();
if(i>0)
{
JOptionPane.showMessageDialog(null, "Your purchase order submited
successfully!");
comitemid.setSelectedItem("select Item ID ..");
txtname.setText("");
txtprice.setText("");
txtcustname.setText("");
txtquantity.setText("");
txttottalamount.setText("");
//txtitemprice.setText("");
comitemid.requestFocusInWindow();
}
else{
JOptionPane.showMessageDialog(null, "Item not inserted successfuly!");
}
}
catch(Exception ex)
{
JOptionPane.showMessageDialog(null, ex);
} }

Connectivity
public Vector getEmployee()throws Exception
{
Vector<Vector<String>> employeeVector = new Vector<Vector<String>>();

Class.forName("java.sql.Driver");
Connection con =
DriverManager.getConnection("jdbc:mysql://localhost:3306/fastfood", "root", "root");
PreparedStatement pre = con.prepareStatement("select * from item ");
ResultSet rs = pre.executeQuery();

while(rs.next())
{
Vector<String> employee = new Vector<String>();
employee.add(rs.getString(1)); //Empid
employee.add(rs.getString(2)); //name
employee.add(rs.getString(3)); //position
//employee.add(rs.getString(4)); //department
employeeVector.add(employee);
}

/*Close the connection after use (MUST)*/

return employeeVector;
}
}

Вам также может понравиться