Fast Food Store Group Boxes and Other User Controls

Similar documents
Music and Videos. with Exception Handling

Program Example 15 String Handling 2

Department of Computer and Mathematical Sciences. Lab 7: Selection

1. Create your First VB.Net Program Hello World

(conditional test) (action if true) It is common to place the above selection statement in an If block, as follows:

A Second Visual BASIC Application : Greetings

Creating an event driven computer program using C# Level 2 Notes for City & Guilds 7540 Unit 008 Written for Microsoft Visual C# 2005 Express

First Visual Basic Lab Paycheck-V1.0

Full file at

Dive Into Visual C# 2010 Express

Full file at Programming in Visual Basic 2010

CS708 Lecture Notes. Visual Basic.NET Object-Oriented Programming. Implementing Client/Server Architectures. Part (I of?) (Lecture Notes 5A)

NOTES: Variables & Constants (module 10)

Visual Basic/C# Programming (330)

Copyright 2014 Pearson Education, Inc. Chapter 7. Multiple Forms, Modules, and Menus. Copyright 2014 Pearson Education, Inc.

Liam Chowdhury Event Driven Programming st STUDENT NUMBER: st YEAR:2013/14 GROUP:

Introductionto the Visual Basic Express 2008 IDE

Chapter 2. Creating Applications with Visual Basic Pearson Addison-Wesley. All rights reserved. Addison Wesley is an imprint of

Customer details are included on a separate worksheet (Customer Look Up) Item details are included on a separate worksheet (Item Look Up)

Procedures (Subroutines) and Functions

Chapter 2 Visual Basic Interface

IMS1906: Business Software Fundamentals Tutorial exercises Week 5: Variables and Constants

Microsoft Visual Basic 2015: Reloaded

IT3101 -Rapid Application Development Second Year- First Semester. Practical 01. Visual Basic.NET Environment.

Wyo VB Lecture Notes - Objects, Methods, & Properties

Interface Design in C#

Chapter 12: Using Controls

C HAPTER S EVEN F OCUS ON J AVAS CRIPT AND VBSCRIPT E XTENSIONS

Microsoft Visual Basic 2005: Reloaded

Data Types Literals, Variables & Constants

Starting Out With Visual Basic 2012, 6th Edition Page 1

DEVELOPING OBJECT ORIENTED APPLICATIONS

Rock-Paper-Scissors Multiple versions Nested If / Else If / Else Random Numbers

CASIO SE-S2000 Cash Register

Data Types Literals, Variables & Constants

How to Create Fields in Microsoft CRM Online

Our first program is a simple calculator, which will carry out the arithmetic operations of adding, subtracting, multiplying and dividing numbers.

SKILL AREA 306: DEVELOP AND IMPLEMENT COMPUTER PROGRAMS

CS 106A, Lecture 5 Booleans and Control Flow

1 Dept: CE.NET Programming ( ) Prof. Akash N. Siddhpura. Working with Form: properties, methods and events

Class Test 4. Question 1. Use notepad to create a console application that displays a face. See figure 1. Figure 1. Question2

Menus, Common Dialog Controls, Context Menus, Sub Procedures, and Functions

You will learn how to plan an OO application in this lesson. Steps three through six of the process are covered in Lessons B and C.

Chapter 12. OOP: Creating Object- Oriented Programs. McGraw-Hill. Copyright 2011 by The McGraw-Hill Companies, Inc. All Rights Reserved.

Project 3 Restaurant or Store

CS 2316 Homework 9b GT Thrift Shop Due: Wednesday, April 20 th, before 11:55 PM Out of 100 points. Premise

How-To: Build your Menu a condensed manual

Visual C# Program: Temperature Conversion Program

Controls. By the end of this chapter, student will be able to:

1. Getting Started Learning Outcomes Introduction Starting up Visual Basic for Applications Exercise 1...

How to Run Reports in Version 12

Module 1 - Applied Named Formulas: Invoice 2-1

Extra Fee for Magento 2

Design Of Human Computer Interfaces Assignment 1- Hello World. Compliance Report

Function: function procedures and sub procedures share the same characteristics, with

Reasoning Through Applications

! Two questions when we design an OO system : ! Our Initial goal: learn to design and implement simple objects.

This homework has an opportunity for substantial extra credit, which is described at the end of this document.

Lab 3 - Pizza. Purpose. Assignment

DATA WAREHOUSE BASICS

6/14/2010. VBA program units: Subroutines and Functions. Functions: Examples: Examples:

Long Distance Call. Long Distance Call 9/28/2015

Full file at Chapter 2: Creating a User Interface

Lab 5: Repetition Structures This lab accompanies Chapter 5 of Starting Out with Programming Logic & Design.

Variable A variable is a value that can change during the execution of a program.

Finally, a receipt is printed on the screen and, after a pause, the process repeats for the next customer.

CECS 189D EXAMINATION #1

NOTES: Procedures (module 15)

CS Homework 11

Decision Structures. Start. Do I have a test in morning? Study for test. Watch TV tonight. Stop

TO EARN ANY CREDIT, YOU MUST SHOW STEPS LEADING TO THE ANSWER

Pandell Projects Tip Sheet

I101/B100 Problem Solving with Computers

Microsoft Visual Basic 2012: Reloaded

Honors Introduction to C (COP 3223H) Program 5 Pizza Shack Inventory and Finances

Program Organization and Comments

Boolean Algebra Boolean Algebra

Level 2 Creating an event driven computer program using C# ( )

GUI Design and Event-Driven Programming

Programming Logic Beginning

Programming Logic - Beginning

Graphical User Interface Canvas Frame Event structure Platform-free GUI operations Operator << Operator >> Operator = Operator ~ Operator + Operator

EXCEL ADVANCED Linda Muchow

Copyright 2014 Pearson Education, Inc. Chapter 3. Variables and Calculations. Copyright 2014 Pearson Education, Inc.

WinForms Lab (developed by Joe Hummel, modified by Shereen Khoja)

Functions and Procedures. Functions. Built In Functions. Built In Functions in VB FIT 100 FIT 100

Introduction to Computer Science II (CSI 1101)

IN COLLABORATION WITH IVTB. Diploma in Information Technology. Examinations for / Semester 2

After logging in successfully, a list of all the leads generated from your exclusive postcode or postcodes will be displayed.

Introduction to the Visual Basic Express 2005IDE

Chapter 3. Variables and Calculations Pearson Addison-Wesley. All rights reserved. Addison Wesley is an imprint of

Copyright 2014 Pearson Education, Inc. Chapter 6. Procedures and Functions. Copyright 2014 Pearson Education, Inc.

Final Examination Semester 2 / Year 2010

MARKING GUIDELINE NATIONAL CERTIFICATE (VOCATIONAL) NOVEMBER EXAMINATION. PRINCIPLES OF COMPUTER PROGRAMMING (First Paper) NQF LEVEL 3

Programming. C# Programming: From Problem Analysis to Program Design 2nd Edition. David McDonald, Ph.D. Director of Emerging Technologies

Learning VB.Net. Tutorial 19 Classes and Inheritance

Sourcing - How to Create a Negotiation

Programming Language 2 (PL2)

Visual BASIC Creating an Application. Choose File New Project from the menu

CST242 Windows Forms with C# Page 1

Transcription:

VISUAL BASIC Fast Food Store Group Boxes and Other User Controls Copyright 2014 Dan McElroy Sample Program Execution The customer receipt is updated each time another selection is made and the Enter button is clicked. More than one selection can be made, but the Enter button must be clicked for each selection. The receipt and all selections are cleared when the Clear button is clicked. 1

Label Font Size = 20 Bold 2

GroupBox Text=Sandwich GroupBox Text=Sandwich 3

GroupBox Text=Sandwich Radio Buttons Two more GroupBoxs with RadioButtons or CheckBoxes GroupBox Text=Sandwich Radio Buttons Two more GroupBoxs with RadioButtons or CheckBoxes Check Boxes 4

Buttons Label AutoSize=False BorderStyle = Fixed3D 5

Name Each Object These are the names that I chose. You can choose any names you wish as long as they are descriptive. frmfastfood lbltitle btnclear btnenter btnexit chkcdheese chkfries chkonionrings chktomato radnosandwich radhamburger radchickensandwich radfishsandwich radnodrink radcola radorange radrootbeer lblorderreceipt Sturctured Design Form_Load Event Clear Button Event Enter Button Event Exit Button Event Initialize Variables Clear Receipt Clear Selections Compute Selections Update Receipt Global Constants and Variables 6

Initialize Variables: set all variables to zero Sub Tasks Clear Receipt Set the label used for the receipt to an empty string Clear Selections For each group of RadioButtons, set the Checked property for the None button to True. This will set the Checked property all of the other radio buttons in the group to False For each CheckBox, set its Checked property to False Compute Selections Examine each customer selection (RadioButton or CheckBox), keep a count of the number of times an item from the group has been selected, and add the price of the item to the subtotal. Update Receipt Display the number of items and price for each group, compute and display the subtotal, tax and total The Code (so far) I have completed the code for the sandwiches, the cheese and tomatoes You need to complete the code for drinks and the extras, and any additional code for these items that would be included in the Enter and Clear buttons. 7

Class Level Constants ' Class level Constants Const TAX_RATE As Decimal = 0.0875 ' 8.75% tax rate Const PRICE_HAMBURGER As Decimal = 2.75 Const PRICE_FISH_SANDWICH As Decimal = 3.25 Const PRICE_CHICKEN_SANDWICH As Decimal = 2.49 Const PRICE_CHEESE As Decimal = 0.1 ' 10 cents Const PRICE_TOMATO As Decimal = 0.2 ' 20 cents ' --- You need to include the price of all items Class Level Variables ' Class Level Variables - Count of Each Item Dim countofsandwiches As Integer '--- You need to include the count of each group items ' Class Level Variables - Subtotal, Tax and Total Dim subtotalsandwiches As Decimal Dim subtotaldrinks As Decimal Dim subtotalextras As Decimal Dim subtotal As Decimal Dim tax As Decimal Dim total As Decimal 8

Form_Load Event The Form_Load event occurs when the form is first loaded. The Form_Load event needs to: Initialize the variables Clear the customer selections Clear the customer receipt Individual helper subroutines are provided to implement these tasks. Form_Load Event ' Form Load Event ' Initialize variables and clear the form Private Sub frmfastfood_load(... ) Handles MyBase.Load InitializeVariables() ClearTheCustomerSelections() ClearTheReceipt() End Sub 9

Enter_Button Event The Enter_Button event occurs when Enter button is clicked: Compute the counts and prices of the current selection Update the customer receipt Clear the customer selections Individual helper subroutines are provided to implement these tasks. Enter_Button Event Private Sub btnenter_click(... ) Handles btnenter.click ComputeCurrentSelection() UpdateCustomerReceipt() ClearTheCustomerSelections() End Sub 10

Clear_Button Event The Clear_Button event occurs when Clear button is clicked: The Clear_Button event needs to Initialize the variables Clear the customer selections Clear the customer receipt Individual helper subroutines are provided to implement these tasks. Clear_Button Event The Clear_Button event occurs when Clear button is clicked: The Clear_Button event needs to Initialize the variables Clear the customer selections Clear the customer receipt Individual helper subroutines are provided to implement these tasks. 11

Exit_Button Event The Exit_Button event occurs when Exit button is clicked: The Exit_Button event needs to Quit the program Private Sub btnexit_click(... ) Handles btnexitclick Me.Close() End Sub 12