# Project #10414 - Visual Basic

FINAL EXAM PROJECT

Visual Basic Internet Section

The local pizza store, Mama Jane’s has hired you to develop a program that will make it easier for their sales associates to compute a customer's bill. You are to write a program that will allow the cashier to enter in customer information, pizza information and display the total amount due.

Here are the pertinent details:

COST OF THE PIZZA: The actual cost of the pizza is based on the pizza size and the pizza style. The style is either regular or stuffed crust and the size can be small, medium, large or monster. See the table below for price information. Internally you can handle this in one of two ways – you can either store this internally in a two-dimensional array/table or you can use an array of structures with two fields like you did in the state/abbreviation program.

 Small Medium Large Monster Regular 5.99 6.99 7.99 8.99 Stuffed Crust 6.99 7.99 8.99 9.99

• Two-Dimensional Array Approach: If you are going to use a 2D array/table, you could declare it using something like this:

Dim pizzaArrayDecimal(,) AsDecimal = {{5.99, 6.99, 7.99, 8.99}, _

{6.99, 7.99, 8.99, 9.99}}

• Array of Structures Approach: If you are going to use an array of structures, you could use a similar setup to the state/abbreviation program with the fields being regularDecimal and stuffedDecimal. You would then need an array of 4 elements (for each size) that you could initialize in the form load as in the state/abbreviation program.

PIZZA TOPPINGS:A customer can order one or more toppings for their pizza. Toppings are \$0.75 each (use a constant) and will be one of the following:

• Peppers

• Onions

• Cheese

DISCOUNTS: A customer may receive a discount on their purchase. Discounts are computed before taxes and can be one of the following (use a constant):

• None – no discount

• Coupon - 10% discount

• Preferred customer card - 15% discount

TAXES: The final bill should also add in a state sales tax of 8% (use a constant) before calculating the amount due.

NOTE: Use appropriate constants for all numerical values that are predefined (e.g., toppings, tax, discounts).

# Form Specifications

Splash Screen: -- Your program should have a standard splash screen before bringing up the input form above. The splash screen should contain your name in the copyright information.

Text Boxes: -- You will use textboxes for all customer information. VALIDATION REQUIRED: All fields must contain information or an error message will be displayed. CODING TIP: You will want to use a nested IF/ELSE rather than a TRY/CATCH to perform the data validation of each field.

• Customer Name

• City

• State

• Zip

Combo Boxes/Lists

• Pizza Size: Should be one of the following – small, medium, large or monster. Selection required. VALIDATION REQUIRED: A size must be selected or an error should appear.

• Pizza Style: Should be one of the following – regular or stuffed crust. Selection required. VALIDATION REQUIRED: A style must be selected or an error should appear.

Check Boxes/Groups:

• Toppings: Can be none, or, one or more of the following: peppers, onions and extra cheese.

Option Buttons/Groups:

• Discount: May be none or 10% coupon or preferred customer (15% discount).

Menu System – The menu system should contain the following options (you can organize the menu choices however you’d like):

• Calculate - Totals the customer's bill after adding any toppings, deducting discounts and adding appropriate tax (assuming all data validation tests are passed). Displays the subtotal, discount, tax and amount due in the label box as currency. Note that if any validation error occurs, the program should not calculate or display any totals.

• Font – Changes the font of the amount due label.

• Color – Changes the color of the amount due label.

• Clear - Clears all the text, check and option buttons, and totals. Repositions the cursor in the customer name text box for the next customer.

• (extra credit) Print – For extra credit, code print menu option that prints an invoice that will be taped to the pizza box for the delivery person. This should print all relevant information, including customer name and address, pizza size and style, toppings, subtotal, discount, tax and amount due. Note, the sample EXE does not have the print coded.

• File/Exit - Exits the program.

CODING TIP: You do not need a search routine to perform the calculations as you did in the module 8 program.

What You Will Be Graded On

## What You Need To Turn In

You should submit the test as you have submitted all previous VB programming assignments. Be sure to submit the entire folder that contains your project. Compress (zip) the folder and submit it using the D2L dropbox.

### Note: Any incomplete or incorrectly submitted tests are subject to receiving a grade of zero. Be sure to submit your program correctly in D2L dropbox with all the necessary files.

Late Penalty: 25% penalty if turned in after the deadline. An additional penalty of 25% will be assessed for each additional 24-hour period beyond the due date that the project is late.

 Subject Computer Due By (Pacific Time) 08/08/2013 12:00 am
TutorRating
pallavi

Chat Now!

out of 1971 reviews
amosmm

Chat Now!

out of 766 reviews
PhyzKyd

Chat Now!

out of 1164 reviews
rajdeep77

Chat Now!

out of 721 reviews
sctys

Chat Now!

out of 1600 reviews

Chat Now!

out of 770 reviews
topnotcher

Chat Now!

out of 766 reviews
XXXIAO

Chat Now!

out of 680 reviews