2. Cookie Maker Shoppe | Paige A Whitfield
Page 1 of 19
Table of
Contents
Step 1: Business Scenario........................................................................................................................................................2
Purpose:.....................................................................................................................................................................................2
Input:...........................................................................................................................................................................................2
Process:......................................................................................................................................................................................2
Output:........................................................................................................................................................................................2
Step 2: Design Form #1............................................................................................................................................................3
Step 2: Design Form #2.......................................................................................................................................................4
Step 2: Design Form #3.......................................................................................................................................................5
Step 2: Design Form #4.......................................................................................................................................................6
Step 2: Design Form #5.......................................................................................................................................................7
Step 3: Controls and Values Table.......................................................................................................................................8
Step 4: Flowchart.....................................................................................................................................................................16
Step 5: Pseudocode.................................................................................................................................................................18
3. Cookie Maker Shoppe | Paige A Whitfield
Page 2 of 19
Step 1: Business Scenario
Purpose:
As a friend of the owner of Cookie Maker Shoppe, whois a developer, has asked me to produce a
simple program for customers to send us their orders. She has specified that this program allow the
customer to order any number of cookieboxes and customize the order. Customization can include
type of cookie dough and quantity of boxes per type selected. She also specified that the program
should calculatethe price, including the subtotal of the order, the sales tax and the final cost. Other
features are added at our customers’ request. Enabling this program willallow Cookie Maker
Shoppe to assist more customers at a time withmultiple ways to order.
Input:
The customer will be prompted to add their items to the cart and then customize their order.
The list of available cookieflavorsfor purchase:
Chocolate Chip
Chocolate
Peanut Butter
Sugar
Gingerbread
Oatmeal Raisin
White Macadamia Nut
Process:
The program will take the values from any of the forms and send the values to the other forms that
request the data.
Output:
The functions will return the costs as a statement. The customer can then print the form.
5. Cookie Maker Shoppe | Paige A Whitfield
Page 4 of 19
Step 2: Design Form #2
btnAddItem btnExitShoppe
lstSelectCookie
lblTitle
sspShoppe
6. Cookie Maker Shoppe | Paige A Whitfield
Page 5 of 19
Step 2: Design Form #3
btnSubmit
btnOpenPrint
btnExitOrder
txtLastName
txtFirstName
txtEmail
rbtnPickup
rbtnShipOrder
txtAddresssspOrder
7. Cookie Maker Shoppe | Paige A Whitfield
Page 6 of 19
Step 2: Design Form #4
btnDisplayData
btnPrint
btnExitPrint
lblDate
lblYourName
lblYourEmail
lblYourAddress
lstItemList
lblYourTotal
cbxYes
cbxNo
sspPrint
8. Cookie Maker Shoppe | Paige A Whitfield
Page 7 of 19
Step 2: Design Form #5
lblTitle
Label1
9. Cookie Maker Shoppe | Paige A Whitfield
Page 8 of 19
Step 3: Controls and Values Table
Control Type Control Names Description Property Property Value
Form frmMain
This is the main form
with the shopping cart.
Text:
Font:
Size:
ForeColor:
BackColor:
Cookie Maker Cart
Cambria, 9pt
747, 633
Green
MintCream
Label lblTitle
This label displays
‘Cookie Maker
Shoppe’.
Text:
Font:
Size:
AutoSize:
ForeColor:
BackColor:
TextAlign:
Cookie Maker Shoppe
Cambria, 26.25pt
580, 56
False
Green
MintCream
MiddleCenter
MenuStrip [Default Name]
This is the menu strip
on the main form.
BackColor: MintCream
Button btnEnterShoppe
This button opens the
products list form.
Text:
Font:
Size:
AutoSize:
ForeColor:
BackColor:
TextAlign:
Enter &Shoppe
Cambria, 11.25pt
122, 50
False
Green
LightGreen
MiddleCenter
Button btnCompleteOrder
This button opens the
customer information
form.
Text:
Font:
Size:
AutoSize:
ForeColor:
BackColor:
TextAlign:
Complete &Order
Cambria, 11.25pt
122, 50
False
Green
LightGreen
MiddleCenter
Button btnExitCart
This button closes the
form.
Text:
Font:
Size:
AutoSize:
ForeColor:
BackColor:
TextAlign:
E&xit Cart
Cambria, 11.25pt
122, 50
False
Green
LightGreen
MiddleCenter
ListBox lstItemsInCart
This list box displays
the user selected
items.
Font:
Size:
ForeColor:
BackColor:
Cambria, 9pt
256, 242
Green
LightGreen
Button btnDeleteItem
This button deletes the
selected item from the
list box.
Text:
Font:
Size:
AutoSize:
ForeColor:
BackColor:
TextAlign:
&Delete Item
Cambria, 11.25pt
122, 51
False
Green
LightGreen
MiddleCenter
Button btnClear
This button clears
everything on the
main form.
Text:
Font:
Size:
AutoSize:
ForeColor:
BackColor:
TextAlign:
Clea&r
Cambria, 11.25pt
122, 51
False
Green
LightGreen
MiddleCenter
10. Cookie Maker Shoppe | Paige A Whitfield
Page 9 of 19
Button btnCalculate
This button calculates
the subtotal, tax and
total.
Text:
Font:
Size:
AutoSize:
ForeColor:
BackColor:
TextAlign:
&Calculate
Cambria, 11.25pt
122, 51
False
Green
LightGreen
MiddleCenter
TextBox txtChocChip
This textbox accepts
quantity for chocolate
chip.
Font:
Size:
BorderStyle:
ForeColor:
BackColor:
Cambria, 9pt
178, 22
Fixed3D
Green
LightGreen
TextBox txtChoc
This textbox accepts
quantity for chocolate.
Font:
Size:
BorderStyle:
ForeColor:
BackColor:
Cambria, 9pt
178, 22
Fixed3D
Green
LightGreen
TextBox txtPeanut
This textbox accepts
quantity for peanut
butter.
Font:
Size:
BorderStyle:
ForeColor:
BackColor:
Cambria, 9pt
178, 22
Fixed3D
Green
LightGreen
TextBox txtSugar
This textbox accepts
quantity for sugar.
Font:
Size:
BorderStyle:
ForeColor:
BackColor:
Cambria, 9pt
178, 22
Fixed3D
Green
LightGreen
TextBox txtGinger
This textbox accepts
quantity for
gingerbread.
Font:
Size:
BorderStyle:
ForeColor:
BackColor:
Cambria, 9pt
178, 22
Fixed3D
Green
LightGreen
TextBox txtOatmeal
This textbox accepts
quantity for oatmeal
raisin.
Font:
Size:
BorderStyle:
ForeColor:
BackColor:
Cambria, 9pt
178, 22
Fixed3D
Green
LightGreen
TextBox txtWhiteNut
This textbox accepts
quantity for white
macadamia nut.
Font:
Size:
BorderStyle:
ForeColor:
BackColor:
Cambria, 9pt
178, 22
Fixed3D
Green
LightGreen
Label lblSubtotal
This label displays the
calculated subtotal.
Text:
Font:
Size:
BorderStyle:
AutoSize:
ForeColor:
BackColor:
Text deleted
Cambria, 9pt
117, 25
Fixed3D
False
Green
LightGreen
Label lblTax
This label displays the
calculated tax.
Text:
Font:
Size:
BorderStyle:
AutoSize:
ForeColor:
BackColor:
Text deleted
Cambria, 9pt
117, 25
Fixed3D
False
Green
LightGreen
Label lblTotal
This label displays the
calculated total.
Text:
Font:
Size:
BorderStyle:
Text deleted
Cambria, 9pt
117, 25
Fixed3D
11. Cookie Maker Shoppe | Paige A Whitfield
Page 10 of 19
AutoSize:
ForeColor:
BackColor:
False
Green
LightGreen
Label [Default Name]
This label displays the
message ‘Order
cookies by the boxes!’
Text:
Font:
ForeColor:
BackColor:
Order cookies by the boxes!
Cambria, 12pt
Green
MintCream
Label [Default Name]
This label displays the
message ‘Items in
Cart’.
Text:
Font:
AutoSize:
ForeColor:
BackColor:
Items in Cart
Cambria, 15.75pt
False
Green
MintCream
Label [Default Name]
This label displays
‘Subtotal:’
Text:
Font:
ForeColor:
BackColor:
Subtotal:
Cambria, 9pt
Green
MintCream
Label [Default Name]
This label displays
‘Tax:’.
Text:
Font:
ForeColor:
BackColor:
Tax:
Cambria, 9pt
Green
MintCream
Label [Default Name]
This label displays
‘Total’.
Text:
Font:
ForeColor:
BackColor:
Total:
Cambria, 9pt
Green
MintCream
Label [Default Name]
This label displays
‘Chocolate Chip’.
Text:
Font:
ForeColor:
BackColor:
Chocolate Chip
Cambria, 9pt
Green
MintCream
Label [Default Name]
This label displays
‘Chocolate’.
Text:
Font:
ForeColor:
BackColor:
Chocolate
Cambria, 9pt
Green
MintCream
Label [Default Name]
This label displays
‘Peanut Butter’.
Text:
Font:
ForeColor:
BackColor:
Peanut Butter
Cambria, 9pt
Green
MintCream
Label [Default Name]
This label displays
‘Sugar’.
Text:
Font:
ForeColor:
BackColor:
Sugar
Cambria, 9pt
Green
MintCream
Label [Default Name]
This label displays
‘Gingerbread’.
Text:
Font:
ForeColor:
BackColor:
Gingerbread
Cambria, 9pt
Green
MintCream
Label [Default Name]
This label displays
‘Oatmeal Raisin’.
Text:
Font:
ForeColor:
BackColor:
Oatmeal Raisin
Cambria, 9pt
Green
MintCream
Label [Default Name]
This label displays
‘White Macadamia
Nut’.
Text:
Font:
ForeColor:
BackColor:
White Macadamia Nut
Cambria, 9pt
Green
MintCream
GroupBox [Default Name]
This holds the order
quantity textboxes.
Text:
Font:
Size:
AutoSize:
ForeColor:
BackColor:
Type Order Quantity
Cambria, 9pt
325, 205
False
Green
MintCream
12. Cookie Maker Shoppe | Paige A Whitfield
Page 11 of 19
StatusStrip sspMain
This status strip
displays error and
other messages.
Font:
BackColor:
Cambria, 9pt
MintCream
Form frmEnterShoppe
This is the form with
the products list.
Text:
Font:
Size:
ForeColor:
BackColor:
Cookie Maker Shoppe
Cambria, 9pt
623, 352
Green
MintCream
Label lblTitle
This label displays
‘Cookie Maker
Shoppe’.
Text:
Font:
Size:
AutoSize:
ForeColor:
BackColor:
TextAlign:
Cookie Maker Shoppe
Cambria, 26.25pt
497, 52
False
Green
MintCream
MiddleCenter
Button btnAddItem
This button adds the
selected item to the
shopping cart.
Text:
Font:
Size:
AutoSize:
ForeColor:
BackColor:
TextAlign:
&Add Item
Cambria, 11.25pt
105, 48
False
Green
LightGreen
MiddleCenter
Button btnExitShoppe
This button closes the
form.
Text:
Font:
Size:
AutoSize:
ForeColor:
BackColor:
TextAlign:
&Exit Shoppe
Cambria, 11.25pt
105, 47
False
Green
LightGreen
MiddleCenter
ListBox lstSelectCookie
This listbox lists the
products.
Font:
Size:
ForeColor:
BackColor:
Cambria, 9pt
261, 102
Green
LightGreen
StatusStrip sspShoppe
This status strip
displays error and
other messages.
Font:
BackColor:
Cambria, 9pt
MintCream
Form frmCompleteOrder
This is the form to
enter customer
information.
Text:
Font:
Size:
Complete Cookie Order
Cambria, 9pt
520, 575
Green
MintCream
Label lblTitle
This label displays
‘Cookie Maker
Shoppe’.
Text:
Font:
Size:
AutoSize:
ForeColor:
BackColor:
TextAlign:
Cookie Maker Shoppe
Cambria, 26.25pt
480, 52
False
Green
MintCream
MiddleCenter
Button btnSubmit
This button sends the
order to the Shoppe
database.
Text:
Font:
Size:
AutoSize:
ForeColor:
BackColor:
TextAlign:
&Submit Order
Cambria, 11.25pt
105, 47
False
Green
LightGreen
MiddleCenter
Button btnOpenPrint
This button opens the
print form.
Text:
Font:
Size:
AutoSize:
ForeColor:
&Print
Cambria, 11.25pt
105, 47
False
Green
13. Cookie Maker Shoppe | Paige A Whitfield
Page 12 of 19
BackColor:
TextAlign:
LightGreen
MiddleCenter
Button btnExitOrder
This button closes the
form.
Text:
Font:
Size:
AutoSize:
ForeColor:
BackColor:
TextAlign:
&Exit
Cambria, 11.25pt
105, 47
False
Green
LightGreen
MiddleCenter
Label lblEnterFirstName
This label displays
‘Enter first name:’.
Text:
Font:
ForeColor:
BackColor:
Enter first name:
Cambria, 9pt
Green
LightGreen
Label lblEnterLastName
This label displays
‘Enter last name:’.
Text:
Font:
ForeColor:
BackColor:
Enter last name:
Cambria, 9pt
Green
LightGreen
Label lblEnterEmail
This label displays
‘Enter email:’.
Text:
Font:
ForeColor:
BackColor:
Enter email:
Cambria, 9pt
Green
LightGreen
Textbox txtFirstName
This textbox accepts
your first name.
Font:
Size:
BorderStyle:
ForeColor:
BackColor:
Cambria, 9pt
231, 22
Fixed3D
Green
LightGreen
Textbox txtLastName
This textbox accepts
your last name.
Font:
Size:
BorderStyle:
ForeColor:
BackColor:
Cambria, 9pt
231, 22
Fixed3D
Green
LightGreen
Textbox txtEmail
This textbox accepts
your email.
Font:
Size:
BorderStyle:
ForeColor:
BackColor:
Cambria, 9pt
231, 22
Fixed3D
Green
LightGreen
Groupbox [Default Name]
This groupbox holds
the order type options.
Text:
Font:
Size:
AutoSize:
ForeColor:
BackColor:
Order Type
Cambria, 9pt
231, 100
False
Green
MintCream
RadioButton rbtnPickup
This radiobutton is
selected for pickup
orders.
Text:
Font:
ForeColor:
BackColor:
&In-Store Pickup
Cambria, 9pt
Green
MintCream
RadioButton rbtnShipOrder
This radiobutton is
selected for delivery
orders.
Text:
Font:
ForeColor:
BackColor:
Ship &Order
Cambria, 9pt
Green
MintCream
Label lblEnterAddress
This label displays
‘Enter shipping
address:’.
Text:
Font:
ForeColor:
BackColor:
Enter shipping address:
Cambria, 9pt
Green
LightGreen
Textbox txtAddress
This textbox accepts
your address.
Font:
Size:
BorderStyle:
ForeColor:
BackColor:
Cambria, 9pt
231, 92
Fixed3D
Green
LightGreen
14. Cookie Maker Shoppe | Paige A Whitfield
Page 13 of 19
StatusStrip sspOrder
This status strip
displays error and
other messages.
Font:
BackColor:
Cambria, 9pt
MintCream
Form frmCookiePrint
This is the form to
display information
for printing.
Text:
Font:
Size:
ForeColor:
BackColor:
Print Cookie Order
Cambria, 9pt
623, 807
Green
MintCream
Label lblTitle
This label displays
‘Cookie Maker
Shoppe’.
Text:
Font:
Size:
AutoSize:
ForeColor:
BackColor:
TextAlign:
Cookie Maker Shoppe
Cambria, 26.25pt
580, 56
False
Green
MintCream
MiddleCenter
Button btnDisplayData
This button gets and
displays data from
other forms.
Text:
Font:
Size:
AutoSize:
ForeColor:
BackColor:
TextAlign:
&Display Order
Cambria, 11.25pt
122, 51
False
Green
LightGreen
MiddleCenter
Button btnPrint
This button sends the
data to the printer.
Text:
Font:
Size:
AutoSize:
ForeColor:
BackColor:
TextAlign:
&Print Order
Cambria, 11.25pt
122, 51
False
Green
LightGreen
MiddleCenter
Button btnExitPrint
This button closes the
form.
Text:
Font:
Size:
AutoSize:
ForeColor:
BackColor:
TextAlign:
&Exit
Cambria, 11.25pt
122, 51
False
Green
LightGreen
MiddleCenter
Label [Default Name]
This label displays
‘Today’s Date:’.
Text:
Font:
ForeColor:
BackColor:
Today’s Date:
Cambria, 9pt
Green
MintCream
Label lblDate
This label displays the
date of the system.
Text:
Font:
Size:
BorderStyle:
AutoSize:
ForeColor:
BackColor:
Text deleted
Cambria, 9pt
193, 21
Fixed3D
False
Green
LightGreen
GroupBox [Default Name]
This groupbox holds
the order information.
Text:
Font:
Size:
AutoSize:
ForeColor:
BackColor:
Order Information
Cambria, 9pt
502, 208
False
Green
MintCream
Label lblNameText
This label displays
‘Your Name:’.
Text:
Font:
ForeColor:
BackColor:
Your Name:
Cambria, 9pt
Green
MintCream
Label lblEmailText
This label displays
‘Your Email:’.
Text:
Font:
ForeColor:
Your Email:
Cambria, 9pt
Green
15. Cookie Maker Shoppe | Paige A Whitfield
Page 14 of 19
BackColor: MintCream
Label lblAddressText
This label displays
‘Your Address:’.
Text:
Font:
ForeColor:
BackColor:
Your Address:
Cambria, 9pt
Green
MintCream
Label lblYourName
This label displays
what the user entered
as their first name.
Text:
Font:
Size:
BorderStyle:
AutoSize:
ForeColor:
BackColor:
Text deleted
Cambria, 9pt
315, 23
Fixed3D
False
Green
LightGreen
Label lblYourEmail
This label displays
what the user entered
as their last name.
Text:
Font:
Size:
BorderStyle:
AutoSize:
ForeColor:
BackColor:
Text deleted
Cambria, 9pt
315, 23
Fixed3D
False
Green
LightGreen
Label lblYourAddress
This label displays
what the user entered
as their address.
Text:
Font:
Size:
BorderStyle:
AutoSize:
ForeColor:
BackColor:
Text deleted
Cambria, 9pt
315, 95
Fixed3D
False
Green
LightGreen
GroupBox [Default Name]
This groupbox holds
the listbox that gets
the shopping cart list.
Text:
Font:
Size:
AutoSize:
ForeColor:
BackColor:
Item List
Cambria, 9pt
300, 182
False
Green
MintCream
ListBox lstItemList
This listbox lists the
items in the shopping
cart.
Font:
Size:
ForeColor:
BackColor:
Cambria, 9pt
265, 144
Green
LightGreen
Label [Default Name]
This label displays
‘Your Total:’.
Text:
Font:
ForeColor:
BackColor:
Your Total:
Cambria, 9pt
Green
MintCream
Label lblYourTotal
This label gets and
displays the total from
the other form.
Text:
Font:
Size:
BorderStyle:
AutoSize:
ForeColor:
BackColor:
Text deleted
Cambria, 9pt
193, 23
Fixed3D
False
Green
LightGreen
GroupBox [Default Name]
This groupbox holds
the printing options.
Text:
Font:
Size:
AutoSize:
ForeColor:
BackColor:
Ready to Print?
Cambria, 9pt
300, 65
False
Green
MintCream
Checkbox cbxYes
This checkbox allows
the data to be sent to
the printer.
Text:
Font:
ForeColor:
BackColor:
&Yes
Cambria, 9pt
Green
MintCream
16. Cookie Maker Shoppe | Paige A Whitfield
Page 15 of 19
Checkbox cbxNo
This checkbox allows
the user to change
their order and closes
the form.
Text:
Font:
ForeColor:
BackColor:
&No
Cambria, 9pt
Green
MintCream
Label [Default Name]
This label displays the
message ‘Select No to
close the form and edit
your information.’.
Text:
Font:
ForeColor:
BackColor:
Select No to close the form
and edit your information.
Cambria, 9pt
Green
MintCream
Label [Default Name]
This label displays the
message ‘Select yes
before clicking print
order.’.
Text:
Font:
ForeColor:
BackColor:
Select yes before clicking
print order.
Cambria, 9pt
Green
MintCream
StatusStrip sspPrint
This status strip
displays error and
other messages.
Font:
BackColor:
Cambria, 9pt
MintCream
Form frmAbout
This is the form that
displays about
information.
Text:
Font:
Size:
ForeColor:
BackColor:
About Cookie Maker Shoppe
Cambria, 9pt
484, 262
Green
MintCream
Label lblTitle
This label displays
‘Cookie Maker
Shoppe’.
Text:
Font:
Size:
AutoSize:
ForeColor:
BackColor:
TextAlign:
Cookie Maker Shoppe
Cambria, 26.25pt
425, 56
False
Green
MintCream
MiddleCenter
Label [Default Name]
This label displays the
about information.
Text:
Font:
Size:
BorderStyle:
AutoSize:
ForeColor:
BackColor:
Developed by: Paige A
Whitfield
Environmental GIS Student
Kennesaw State University
Course Term Project: IS 3020
Cookie Maker Shoppe Order
Program
Fall 2016
Developed with Microsoft
Visual Studio 2013
Cambria, 9pt
348, 132
Fixed3D
False
Green
LightGreen
19. Cookie Maker Shoppe | Paige A Whitfield
Page 18 of 19
Step 5: Pseudocode
begin
Private Sub btnCalculate_Click(sender As Object, e As EventArgs) Handles btnCalculate.Click
'Declare variables for the calculations
'Subtotal
Dim decSubtotal As Decimal = 0
'Total
Dim decTotal As Decimal = 0
'Tax
Dim decTax As Decimal = 0
'Tax rate
Const decTax_RATE As Decimal = 0.08
'Cookie box cost and cookie type decimals
Const cookieBox As Decimal = 5.0
Dim decChocChip As Decimal
Dim decChoc As Decimal
Dim decPeaBut As Decimal
Dim decSugar As Decimal
Dim decGinger As Decimal
Dim decOatmeal As Decimal
Dim decMacaNut As Decimal
Try
'Calculate each cookie type order separately
decChocChip = CDec(txtChocChip.Text) * cookieBox
decChoc= CDec(txtChoc.Text) * cookieBox
decPeaBut = CDec(txtPeanut.Text) * cookieBox
decSugar = CDec(txtSugar.Text) * cookieBox
decGinger = CDec(txtGinger.Text) * cookieBox
decOatmeal= CDec(txtOatmeal.Text) * cookieBox
decMacaNut = CDec(txtWhiteNut.Text) * cookieBox
'Add together the cookie types to calculate and display the subtotal
decSubtotal= decChocChip + decChoc + decPeaBut + decSugar + decGinger + decOatmeal + decMacaNut
lblSubtotal.Text = decSubtotal.ToString()
'Calculate and display the tax
decTax = decSubtotal* decTax_RATE
lblTax.Text = decTax.ToString()
'Calculate and display the total
decTotal = decSubtotal+ decTax
lblTotal.Text = decTotal.ToString()
Catch ex As Exception
'Error message
lblStatusMain.Text = "ERROR: ALL IMPUT MUST BE NUMERIC VALUES."
End Try
End Sub
end
begin
Private Sub btnSubmit_Click(sender As Object, e As EventArgs) Handles btnSubmit.Click
'Clears status strip
lblStatusOrder.Text = String.Empty
Try
'Submits the order to the Shoppe
If rbtnPickup.Checked = True Then
lblStatusOrder.Text = "Thankyou for your order!Your order has been received!"
ElseIf rbtnShipOrder.Checked = True Then
20. Cookie Maker Shoppe | Paige A Whitfield
Page 19 of 19
lblStatusOrder.Text = "Thankyou for your order!Your order has been received!"
End If
Catch ex As Exception
'Error message if order type not selected
lblStatusOrder.Text = "ERROR: PLEASE SELECT ORDER TYPE BEFORE SUBMITTING."
End Try
End Sub
end