Professional Documents
Culture Documents
BY
Muhammad Atique
2016-ag-8366
BSCS 6th Semester
Bachelor of Computer Science University of
Agriculture
Sub Campus Burewala-Vehari
A Documentation
Approved By
[Major Professor]
Eng. MR Shakeel
TABLE OF CONTENTS
ABSTRACT
ACKNOWLEDGEMENT
1. Introduction
1.2 Objectives
1.3 Purpose
2. Problem Selection
3 Functional requirements
5 System Analysis
5.1 SDLC
6 System Design
8 Screen shots
8.1 Coding
9 Conclusion
ABSTRACT
The objective of the project is to design a System application which enables the
Manager to generate bills save time. The project has been designed in C#.NET technology
and consists of a SQL server which acts as the database for the project.
My motivation for the project came from my enthusiasm and strong urge to learn C# and
.NET which is one of the fastest growing technologies in today’s world. The Coffee
Management project mainly consists of two types of users. The customers who access the
information provided by the Application and the administrator who modifies and updates the
information. All the data needed for the application is stored in the form of tables in the SQL
server 2008. The report contains the details of all the tasks carried out during the entire
software development life cycle of the Coffee Shop Management System. This document
depicts all the details of the project starting from the project design to testing.
Acknowledgements
I would like to thank Engr. MR Shakeel my major professor who has helped me and guided
me through the entire life cycle of the project.
I would also like to specially thank my parents for their constant moral support and
encouragement throughout the project. It is they who have helped me achieve all my dreams
through their blessings throughout my life.
Dedication
I would like to dedicate the project Coffee Shop Management System to My Family and
Teacher, Specially for those who help me to reach this position.
Introduction
The objective of the project is to design a System application which enables the Manager to
generate bills save time. It should speedup the activities taking place in cafe. The billing
system also enhance and error free.
1.1 About Project
The project named “Coffee Shop Management System” is written in C#, mainly because of
it’s suitability for this type of application. Its user friendly nature and in-built
documentation, complication, error detection, binding facilities and interaction with other
software packages make it most powerful tool for software development. More over. C#
consists of all the technologies that help in creating and running robust, scalable and
distributed packages.C# is a general-purpose object-oriented programming language, and is
intended to be an improved C with object capabilities
A few factors that directs us to develop a new system are given below
1) Faster System
2) Accuracy
3) Reliability
4) Informative
> Database and database systems have become an essential component of everyday life
activities that involve some interaction with the database. For example, if we go to
chances are that our activities will involve someone accessing a database.
> The above interactions are examples of what we may call traditional database applications,
where most of the application that is stored and accessed is either textual
> There are several ways to implement databases. Some of them are file handling mechanism,
relational database, object-relational database or object-oriented
The system is very time consuming and lazy. This system is more prone to errors and sometimes the
approach to various problems is unstructured.
If any old data or information is to be fetched then it is a great problem for user to get the
information in short span of time as to get information from files is not an easy task.
As everything is done manually, so if any record is misplaced then agency has to take full
responsibility.
> Description: This use case describes the scenario where the user registers with the
application by providing all the necessary details of an Employ.
> Description: This use case describes the scenario where the user logs into the
application, with the username and password he has provided while registering with the
system.
> Description: This use case describes the scenario where the admin/employ generate bill.
1.1 Use Case name: Login/Logout
> Description: This use case describes the scenario where the administrator of the
application, logs into the system and logs out after the work is done.
> Description: This use case describes the scenario where the administrator adds, deletes
or modifies customer information in the system database
3.3 Nonfunctional Requirements
1 Performance Requirements
> The system shall accommodate 400 users during the peak usage time window of 4:00pm
to 10:00pm local time
2 Security Requirements
> Users shall be required to log in to the system for their own information and modification
with e-mail address and password.
> The system shall permit only authorized members who are on the list of authorized Menu
Managers to do administrator’s task.
C#.
5. SYSTEM ANALYSIS
System is collected, how the data and information is flow from one end to another end using the following
questions: What information drives the department process? What information is generated? Who generates
> Data modeling: The information collected in Business modeling phase is refined into a set of data
objects that are needed to support the project. The attributes of each object are identified and the
> Process modeling: Processing descriptions and functions like adding, modifying, deleting records,
> Application generation: The fourth generation techniques are used to generate application, like reusing
> Testing: Most of the functions are already tested, as they are predefined functions. However, new
> The decision to acquire computer hardware or software must be handled in the same way as any
other business decision. The variety of sizes and types of computing resources available puts a
burden on the analyst who must select suitable hardware, software or services and advise the top
management accordingly.
> Today, selecting a system is a serious and time-consuming business. The time spent on the
selection process is a function of the applications and whether the system is a basic
micro- computer or a mainframe. In either case, planning system selection and
acquiring experienced help where necessary pay off in the long run.
There are various important factors, which should be considered prior to system
> Define system capabilities that make sense for the business.
> Specify the magnitude of the problem, i.e., clarify whether selection entails a few peripherals or a major
This is crucial, especially for first-time users. Selling the system to the user staff, provide adequate training
and creating an environment conductive to implementation are prerequisites for system acquisition.
The selection process should be viewed as a project and a project team should be formed with the help of
management. The selection process consists of several steps, which are discussed below:
> Requirements analysis: The first step in selection understands the user's requirement
within the framework of the organization's objectives and the environment in which the system is
being installed.
> System specifications: System specifications must be clearly defined. These specifications
must reflect the actual applications to be handled by the system and include system objectives,
selected vendors are invited to give a presentation of their system. The system chosen goes through
contract negotiations before implementation.
5.1SDLC
The waterfall model is the most familiar model. This model has five phases: requirements
analysis and specifications, design, implementation and unit testing, integration and system
1. Requirements Analysis and Specification Phase: The goal of this phase is to understand the exact
requirements of the customer and to document them properly. This activity is usually executed together
with the customer, as the goal is to document all functions, performance and interfacing requirements for
the software. The requirements describes the "what" of a system, not the "how".
2. Design phase: The goal of this is to transform the requirements specification into a structure that is
3. Implementation and Unit Testing Phase: During testing, the major activities are centered around the
examination and modification of the code. Initially, small modules are tested in isolation from the rest of
the software product. There are problems associated with testing a module in isolation. How do we run a
module without anything to call it, to be called by it or, possibly, to output intermediate values obtained
during execution? Such problems are solved in this phase and modules are tested after writing some
overhead code.
4. Integration and System Testing Phase: The purpose of unit testing is to determine that each independent
module is correctly implemented. This gives little chance to determine that the interface between
modules is also correct, and for this reason integration testing is performed. System testing involves the
testing of the entire system whereas software is a part of the system. This is essential to build confidence
in the developers before software is delivered to the customer or released in the market.
5. Operation and Maintenance Phase: Software maintenance is a task that every development group has to
face, when the software is delivered to the customer's site, installed and is operational. Therefore, release of
software inaugurates the operation and maintenance phase of the life cycle. The time spent and effort
The systems objectives outlined during the feasibility study serve as the basis from which the
work of system design is initiated. Much of the activities involved at this stage is of technical
nature requiring a certain degree of experience in designing systems, sound knowledge of
computer related technology and thorough understanding of computers available in the market
and the various facilities provided by the vendors. Nevertheless, a system cannot be designed
in isolation without the active involvement of the user. The user has a vital role to play at this
stage too. As we know that data collected during feasibility study will be utilized
systematically during the system design. It should, however, be kept in mind that detailed
study of the existing system is not necessarily over with the completion of the feasibility
study. Depending on the plan of feasibility study, the level of detailed study will vary and the
system design stage will also vary in the amount of investigation that still needs to be done.
This investigation is generally an urgent activity during the system design as the designer
needs to study minute’s details in all aspects of the system. Sometimes, but rarely, this
investigation may form a separate stage between Feasibility Study and Computer System
Design. Designing a new system is a creative process, which calls for logical as well as lateral
thinking. The logical approach involves systematic moves towards the end product keeping in
mind the capabilities of the personnel and the equipment at each decision making step. Lateral
thought implies encompassing of ideas beyond the usual functions and equipment. This is to
ensure that no efforts are being made to fit previous solutions into new situations.
7. SYSTEM TESTING
Software testing is the process of executing a program with the intention of finding errors in
the code. It is the process of exercising or evaluating a system or system component by
manual or by automatic means to verify that it satisfies specified requirements or to identify
differences between expected and actual results.
The objective of testing is to show incorrectness and testing is considered to succeed when an
error is detected. An error is a conceptual mistake made by either the programmer or the
designer or a discrepancy between a computed value and a theoretically correct value. A fault
is a specific manifestation of an error. An error may be cause of several faults. A failure is the
inability of a system or component to perform its required function within the specified limits.
A failure may be produced when a fault is executed or exercised.
Other activities that are often associated with software are static analysis and dynamic
analysis. Static analysis investigates the source code of software, looking for problems and
gathering metrics without actually executing the code. Dynamic analysis looks at the behavior
of software while it is executing, to provide information such as execution traces, timing
profiles and test coverage information.
Mian
using System;
using System.Collections.Generic;
using System.ComponentModel; using
System.Data; using System.Drawing;
using System.Linq; using
System.Text; using
System.Threading.Tasks; using
System.Windows.Forms;
namespace CafeManagement {
public partial class Main : Form {
public Main()
{
InitializeComponent();
}
private void placeOrderToolStripMenuItem_Click(object sender, EventArgs e)
{
Form1 frm = new Form1(); frm.ShowDialog();
this.Close();
}
private void userListToolStripMenuItem_Click(object sender, EventArgs e)
{
Employes_List user_List = new Employes_List();
user_List.Show();
this.Close();
}
private void updateToolStripMenuItem_Click(object sender, EventArgs e)
{
Update_Employes updateUser = new Update_Employes();
updateUser.ShowDialog();
this.Close();
}
private void registrationToolStripMenuItem1_Click(object sender, EventArgs e) {
Registration frmreg = new Registration();
frmreg.ShowDialog();
this.Close();
}
private void logoutToolStripMenuItem_Click(object sender, EventArgs e)
{
this.Hide();
Login frm2 = new Login(); frm2.Show();
}
}
}
try
{
if (string.IsNullOrEmpty(txtemail.Text))
{
MessageBox.Show("Please enter your Username..."); txtemail.Focus();
}
if (string.IsNullOrEmpty(txtpassword.Text))
{
MessageBox.Show("Please enter your Password...");
txtpassword.Focus();
}
else
{
connectionstring = "Data Source=ATIQUE261; user id=sa;
password=angel; Initial Catalog=Atique";
con = new SqlConnection(connectionstring); con.Open();
SqlCommand cmd = new SqlCommand("SELECT * FROM login WHERE
username='" + txtemail.Text + "' AND password='" + txtpassword.Text + .... , con);
SqlDataReader dr = cmd.ExecuteReader();
if (dr.HasRows == true)
{
else
{
}
catch (Exception ex)
{
MessageBox.Show("Error " + "\r\n" + ex.Message);
}
}
}
}
Main Frame
using System;
using System.Collections.Generic;
using System.ComponentModel; using
System.Data; using System.Drawing;
using System.Linq; using
System.Text; using
System.Threading.Tasks; using
System.Windows.Forms;
namespace CafeManagement {
public partial class Main : Form {
public Main()
{
InitializeComponent();
}
private void placeOrderToolStripMenuItem_Click(object sender, EventArgs e)
{
Form1 frm = new Form1(); frm.ShowDialog();
this.Close();
}
private void userListToolStripMenuItem_Click(object sender, EventArgs e)
{
Employes_List user_List = new Employes_List();
user_List.Show();
this.Close();
}
private void updateToolStripMenuItem_Click(object sender, EventArgs e)
{
Update_Employes updateUser = new Update_Employes();
updateUser.ShowDialog();
this.Close();
}
private void registrationToolStripMenuItem1_Click(object sender, EventArgs e) {
Registration frmreg = new Registration();
frmreg.ShowDialog();
this.Close();
}
private void logoutToolStripMenuItem_Click(object sender, EventArgs e)
{
this.Hide();
Login frm2 = new Login(); frm2.Show();
} private void registrationToolStripMenuItem_Click(object sender, EventArgs e)
{
}
}
}
Place order
using System;
using System.Collections.Generic;
using System.ComponentModel; using
System.Data; using System.Drawing;
using System.Linq; using System.Text;
using System.Threading.Tasks; using
System.Windows.Forms;
namespace CafeManagement {
public partial class Form1 : Form {
public Form1()
{
InitializeComponent();
// rtfReceipt.AppendText(Environment.NewLine);
rtfReceipt.AppendText(" --------------------------------------------------
-------------- " + Environment.NewLine);
rtfReceipt.AppendText("\t\t" + "Aati Coffe Shop" + Environment.NewLine);
rtfReceipt.AppendText(" --------------------------------------------------
-------------- " + Environment.NewLine);
rtfReceipt.AppendText("Coffee Latte \t\t\t\t" + txtLatte.Text +
Environment.NewLine);
rtfReceipt.AppendText("Coffee Espresso\t\t\t" + txtEspresso.Text +
Environment.NewLine);
rtfReceipt.AppendText("Coffee Mocha \t\t\t\t" + txtMocha.Text +
Environment.NewLine);
rtfReceipt.AppendText("Hot Coffee \t\t\t" + txtValeCoffee.Text +
Environment.NewLine);
rtfReceipt.AppendText("Capuucino \t\t\t" + txtCappu.Text +
Environment.NewLine);
rtfReceipt.AppendText("Cold Coffee \t\t\t" + txtAfricanCoffee.Text +
Environment.NewLine);
rtfReceipt.AppendText("Milk Tea \t\t\t" + txtMilkTea.Text +
Environment.NewLine);
rtfReceipt.AppendText("Chinese Tea \t\t\t" + txtChineseTea.Text +
Environment.NewLine);
rtfReceipt.AppendText("Coffee Cake \t\t\t" + txtCoffeCake.Text +
Environment.NewLine);
rtfReceipt.AppendText("Vanila Flaver Cake \t\t" + txtRedValvetCake.Text +
Environment.NewLine);
rtfReceipt.AppendText("Black Forest Cake \t\t" + txtBlackForestCake.Text +
Environment.NewLine);
rtfReceipt.AppendText("Cream Cake \t\t" + txtBostonCream.Text +
Environment.NewLine);
rtfReceipt.AppendText("Chocolate Cake \t\t" + txtLagosChoco.Text +
Environment.NewLine);
rtfReceipt.AppendText("White Chocolate Cake \t\t" + txtKillburnChoco.Text +
Environment.NewLine);
rtfReceipt.AppendText("Cheese Cake \t\t\t" + txtCheeseCake.Text +
Environment.NewLine);
rtfReceipt.AppendText("Cake Bake \t\t\t" + txtRainbowCake.Text +
Environment.NewLine);
rtfReceipt.AppendText(" -----------------------------------------------
-------------- " + Environment.NewLine);
rtfReceipt.AppendText("Service Charge \t\t" + lblSvcCharge.Text +
Environment.NewLine);
rtfReceipt.AppendText(" -----------------------------------------------
-------------- " + Environment.NewLine);
rtfReceipt.AppendText("Tax \t\t\t\t" + lblTax.Text + Environment.NewLine);
rtfReceipt.AppendText("Sub Total \t\t\t" + lblSubTotal.Text +
Environment.NewLine);
rtfReceipt.AppendText("Total Cost \t\t\t" + lblTotal.Text +
Environment.NewLine);
rtfReceipt.AppendText(" -----------------------------------------------
-------------- " + Environment.NewLine);
rtfReceipt.AppendText(lblTimer.Text + "\t" + lblDate.Text);
lat = 50.50; mocha = 49.99; espr = 80.50; vale = 100.00; cappu = 150.00;
afri = 160.00; mTea =145.00; cTea = 110.50; //coffee pries
cCake = 190.00; rValvet = 240.00; bFor = 220.00; bCream = 180.00; lChoco =
299.99; kChoco = 260.00; cheese = 360.00; rain = 250; //cake prices
//Coffee
double latteeCof = Convert.ToDouble(txtLatte.Text); double
mochaCof = Convert.ToDouble(txtMocha.Text); double espressoCof =
Convert.ToDouble(txtEspresso.Text); double valeCoffee =
Convert.ToDouble(txtValeCoffee.Text); double cappCof =
Convert.ToDouble(txtCappu.Text); double afriCof =
Convert.ToDouble(txtAfricanCoffee.Text); double miTea =
Convert.ToDouble(txtMilkTea.Text); double cineseTea =
Convert.ToDouble(txtChineseTea.Text);
//Cakes
double cofCake = Convert.ToDouble(txtCoffeCake.Text); double redValvet =
Convert.ToDouble(txtRedValvetCake.Text); double bForest =
Convert.ToDouble(txtBlackForestCake.Text); double bostonCream =
Convert.ToDouble(txtBostonCream.Text); double lagosChoco =
Convert.ToDouble(txtLagosChoco.Text); double kilbChoco =
Convert.ToDouble(txtKillburnChoco.Text); double cheeseCak =
Convert.ToDouble(txtCheeseCake.Text); double rainbow =
Convert.ToDouble(txtRainbowCake.Text);
txtLatte.Enabled = false;
txtEspresso.Enabled = false; ;
txtMocha.Enabled = false;
txtValeCoffee.Enabled = false;
txtCappu.Enabled = false;
txtAfricanCoffee.Enabled = false;
txtMilkTea.Enabled = false;
txtChineseTea.Enabled = false;
txtCoffeCake.Enabled = false;
txtRedValvetCake.Enabled = false;
txtBlackForestCake.Enabled = false;
txtBostonCream.Enabled = false;
txtLagosChoco.Enabled = false;
txtKillburnChoco.Enabled = false;
txtCheeseCake.Enabled = false;
txtRainbowCake.Enabled = false;
chkLatte.Checked = false;
chkEspresso.Checked = false;
chkMocha.Checked = false;
chkValeCoffee.Checked = false;
chkCappucino.Checked = false;
chkAfricanCoffe.Checked = false;
chkMilkTea.Checked = false;
chkChineseTea.Checked = false;
chkRedValvet.Checked = false;
chkCoffe.Checked = false;
chkBlackForest.Checked = false;
chkBostonCream.Checked = false;
checkBox13.Checked = false;
chkKilburnChoco.Checked = false;
chkCheese.Checked = false;
chkRainbowCake.Checked = false;
rtfReceipt.Clear();
txtEspresso.Text = "";
txtEspresso.Focus();
}
if (chkMocha.Checked == true)
{
txtMocha.Enabled = true;
}
else
{
txtMocha.Enabled = false;
txtMocha.Text = "0";
}
}
txtMocha.Text = "";
txtMocha.Focus();
}
if (chkValeCoffee.Checked == true)
{
txtValeCoffee.Enabled = true;
}
else
{
txtValeCoffee.Enabled = false;
txtValeCoffee.Text = "0";
}
}
txtValeCoffee.Text = "";
txtValeCoffee.Focus();
private void chkCappucino_CheckedChanged(object sender, EventArgs e)
{
if (chkCappucino.Checked == true)
{
txtCappu.Enabled = true;
}
else
{
txtCappu.Enabled = false;
txtCappu.Text = "0";
}
}
if (chkAfricanCoffe.Checked == true)
{
txtAfricanCoffee.Enabled = true;
}
else
{
txtAfricanCoffee.Enabled = false;
txtAfricanCoffee.Text = "0";
}
}
txtAfricanCoffee.Text = "";
txtAfricanCoffee.Focus();
}
if (chkMilkTea.Checked == true)
{
txtMilkTea.Enabled = true;
}
else
{
txtMilkTea.Enabled = false;
txtMilkTea.Text = "0";
}
}
txtMilkTea.Text = "";
}
txtMilkTea.Focus();
private void chkChineseTea_CheckedChanged(object sender, EventArgs e) {
if (chkChineseTea.Checked == true)
{
txtChineseTea.Enabled = true;
}
else
{
txtChineseTea.Enabled = false;
txtChineseTea.Text = "0";
}
}
txtChineseTea.Text = "";
txtChineseTea.Focus();
}
if (chkCoffe.Checked == true)
{
txtCoffeCake.Enabled = true;
}
else
{
txtCoffeCake.Enabled = false;
txtCoffeCake.Text = "0";
}
}
txtCoffeCake.Text = "";
txtCoffeCake.Focus();
}
if (chkRedValvet.Checked == true)
{
txtRedValvetCake.Enabled = true;
}
else
{
txtRedValvetCake.Enabled = false;
txtRedValvetCake.Text = "0";
}
}
txtRedValvetCake.Text = "";
txtRedValvetCake.Focus();
} private void chkBlackForest_CheckedChanged(object sender, EventArgs e)
{
if (chkBlackForest.Checked == true)
{
txtBlackForestCake.Enabled = true;
}
else
{
txtBlackForestCake.Enabled = false;
txtBlackForestCake.Text = "0";
}
}
txtBlackForestCake.Text = "";
txtBlackForestCake.Focus();
}
if (chkBostonCream.Checked == true)
{
txtBostonCream.Enabled = true;
}
else
{
txtBostonCream.Enabled = false;
txtBostonCream.Text = "0";
}
}
txtBostonCream.Text = "";
txtBostonCream.Focus();
}
if (checkBox13.Checked == true)
{
txtLagosChoco.Enabled = true;
}
else
{
txtLagosChoco.Enabled = false;
txtLagosChoco.Text = "0";
}
}
if (chkKilburnChoco.Checked == true)
} {
txtKillburnChoco.Enabled = true;
}
else
{
txtKillburnChoco.Enabled = false;
txtKillburnChoco.Text = "0";
}
} private void txtKillburnChoco_Click(object sender, EventArgs e)
{
txtKillburnChoco.Text = "";
txtKillburnChoco.Focus();
}
if (chkCheese.Checked == true)
{
txtCheeseCake.Enabled = true;
}
else
{
txtCheeseCake.Enabled = false;
txtCheeseCake.Text = "0";
}
} private void txtCheeseCake_Click(object sender, EventArgs e)
{
if (chkRainbowCake.Checked == true)
{
txtRainbowCake.Enabled = true;
}
else
{
txtRainbowCake.Enabled = false;
txtRainbowCake.Text = "0";
}
}
lblTimer.Text = DateTime.Now.ToLongTimeString();
private void printDocument1_PrintPage(object sender,
System.Drawing.Printing.PrintPageEventArgs e)
{
e.Graphics.DrawString(rtfReceipt.Text, new Font("Arial", 14,
FontStyle.Regular), Brushes.Black, 120, 120);
}
printPreviewDialog1.Document = printDocument1;
printPreviewDialog1.ShowDialog();
}
}
}