Program 04 (Fall 2014) VB Auto Center Problem Purpose: You are to add Arguments and Parameters to Program 03. See slides 3, 4, and 5 for additional details.

Slides:



Advertisements
Similar presentations
1 ASSIGNMENT OBJECTIVES LEARN TO USE: 1. Textboxes, labels, butttons, picture boxes, properties, radio buttons, checkbox, and methods, group boxes 2.Arithmetic.
Advertisements

IS 1181 IS 118 Introduction to Development Tools VB Chapter 06.
Basics of ASP.NET. 2 © UW Business School, University of Washington 2004 Outline Installing ASP.NET and Web Matrix Data Types Branching Structure Procedures.
Copyright © 2001 by Wiley. All rights reserved. Chapter 3: Variables, Assignment Statements, and Arithmetic Variables Assignment Statements Arithmetic.
ACCESS 2007 ASSIGNMENT SPRING 2014 Purpose: To give students a basic understanding of ACCESS 2007 by constructing a database using the Ready2Read bookstore.
Microsoft Visual Basic 2005 CHAPTER 8 Using Procedures and Exception Handling.
Apply Sub Procedures/Methods and User Defined Functions
Visual Basic Fundamental Concepts. Integrated Development Enviroment Generates startup form for new project on which to place controls. Features toolbox.
Visual Basic Chapter 1 Mr. Wangler.
JavaScript Form Validation
Microsoft Visual Basic 2012 Using Procedures and Exception Handling CHAPTER SEVEN.
Automating Tasks with Visual Basic. Introduction  When can’t find a readymade macro action that does the job you want, you can use Visual Basic code.
Tutorial 11 Using and Writing Visual Basic for Applications Code
Microsoft Visual Basic 2008 CHAPTER 8 Using Procedures and Exception Handling.
© 2006 Lawrenceville Press Slide 1 Chapter 3 Visual Basic Interface.
Using the ACCESS 2007 Ready2Read example as a model for your database assignment you are to do the following: 1.Set up a database for a gold, silver, and.
08/10/ Iteration Loops For … To … Next. 208/10/2015 Learning Objectives Define a program loop. State when a loop will end. State when the For.
Chapter 4: The Selection Process in Visual Basic.
CS0004: Introduction to Programming Subprocedures and Modular Design.
Visual Basic.NET Comprehensive Concepts and Techniques Chapter 5 Decision Making.
 Application – another name for a program.  Interface – is what appears on the screen when the application is running.  Program Code – is instructions.
Microsoft Visual Basic 2005 CHAPTER 4 Variables and Arithmetic Operations.
Chapter 4 Variables and constants. 4.1 Variables -Use of variables is good programming style -easier to modify -easier for a programmer to understand.
COPYRIGHT Spring 2006: Dr. David Scanlan, CSUS ASSIGNMENT OBJECTIVES 1. To learn how to use these controls: - buttons, labels, picture boxes, and a form.
Programming Assignment 05 Blue Jet Flight Information with Class and Inheritance General and specific program requirements: 1. Problem: Blue Jet has just.
CS285 Visual Basic 2 Department of Computing UniS 1 Statements in Visual Basic A statement is the fundamental syntactical element of a program smallest.
IMS 3253: Subroutines 1 Dr. Lawrence West, MIS Dept., University of Central Florida Topics Procedures Subroutines Parameters –By Value.
Microsoft Visual Basic 2005: Reloaded Second Edition Chapter 3 Variables, Constants, Methods, and Calculations.
CS0004: Introduction to Programming Project 1 – Lessons Learned.
ASSIGNMENT OBJECTIVES TO PRACTICE OR USE THE FOLLOWING: 1.CONTROLS: - buttons, labels, picture boxes, groupboxes, and a form 2. EVENTS: - Click, MouseDown,
Writing JavaScript Functions. Goals By the end of this unit, you should understand … How to breakdown applications into individual, re-usable modules.
OBJECTIVES: To open an existing Project called HelloWorld. To learn how set properties using the property window and how to set them in the code. Chapter.
Programming with Microsoft Visual Basic th Edition
© 2006 ITT Educational Services Inc. Introduction to Computer Programming: Unit 10: Chapter 6: Slide 1 Unit 10 Sub Procedures and Functions Chapter 6 Sub.
ASSIGNMENT OBJECTIVES 1. To learn how to use these controls: - buttons, labels, picture boxes, and a form. 2. To learn how to use these events: - Click,
Sanjay Johal. Introduction(1.1) In this PowerPoint I will be explaining :  The purpose of the code for each of the two given programs, e.g. to carry.
CSC 230 (Blum)1 Visual Basic 2005 Hello World Fall 2005 T. Blum.
Practical Programming COMP153-08S Week 5 Lecture 1: Screen Design Subroutines and Functions.
1.
ASSIGNMENT OBJECTIVES TO PRACTICE OR USE THE FOLLOWING: 1.CONTROLS: - buttons, labels, picture boxes, groupboxes, and a form 2. EVENTS: - Click, MouseDown,
COPYRIGHT 2010: Dr. David Scanlan, CSUS OBJECTIVES: How to write classes How to create an object from a class using the "New" keyword. How to communicate.
1 Project 3 The Kumquat Society Conference. 2 Conference Registration In this project you will write a program to handle a conference registration. The.
Program 03 Fall 2014 VB Auto Center Problem Purpose: VB Auto Center has ask you to write a program that will calculate the typical values involved in the.
Programming with Microsoft Visual Basic th Edition
110 E-1 Variables, Constants and Calculations(2) Chapter 3: Operations on variables, scope of a variable, formatting data Doing Arithmetic.
Copyright (c) 2003 by Prentice Hall Provided By: Qasim Al-ajmi Chapter 2 Introduction to Visual Basic Programming Visual Basic.NET.
© 2006 ITT Educational Services Inc. Introduction to Computer Programming: Unit 3: Chapter 3: Slide 1 Unit 3 Formatting Chapter 3 Input, Variables, Constants,
1 ASSIGNMENT OBJECTIVES LEARN TO USE: 1. Textboxes, labels, buttons, picture boxes, properties, and methods 2.Arithmetic computations 3.Variables and constants.
Controlling Program Flow with Decision Structures.
Microsoft Visual Basic 2012 CHAPTER FOUR Variables and Arithmetic Operations.
ASSIGNMENT OBJECTIVES TO PRACTICE OR USE THE FOLLOWING: 1.CONTROLS: - buttons, labels, textbox for password, picture boxes, groupboxes, and a panel. 2.
Addison Wesley is an imprint of © 2011 Pearson Addison-Wesley. All rights reserved. Addison Wesley is an imprint of Chapter 3 Variables and Calculations.
Chapter 4.  Variables – named memory location that stores a value.  Variables allows the use of meaningful names which makes the code easier to read.
Visual Basic Declaring Variables Dim x as Integer = 0 In the statement above, x is being declared as an Integer (whole number) and is initialised.
Chapter 7 Multiple Forms, Modules, and Menus. Section 7.2 MODULES A module contains code—declarations and procedures—that are used by other files in a.
Use TryParse to Validate User Input
Visual Basic Fundamental Concepts
A variable is a name for a value stored in memory.
ASSIGNMENT OBJECTIVES
Apply Procedures to Develop Message, Input, and Dialog Boxes
Variables and Arithmetic Operations
Use TryParse to Validate User Input
Using Procedures and Exception Handling
Variables and Arithmetic Operations
Visual Basic..
Conditions and Ifs BIS1523 – Lecture 8.
Part B – Structured Exception Handling
ASSIGNMENT OBJECTIVES
Introduction to Computer Programming IT-104
Presentation transcript:

Program 04 (Fall 2014) VB Auto Center Problem Purpose: You are to add Arguments and Parameters to Program 03. See slides 3, 4, and 5 for additional details. All values are passed from one module to another thru Arguments and Parameters only; thus, you may not use module-level variables, but you may use module- level constants. 1.The total amount for Accessories and External Finish. Accessory Prices: - Stereo System = $ Leather Interior = $ Computer Navigation = $1, Exterior Finish Prices: - Standard Finish = No additional charge - Pearlized Finish = $ Customized Detailing = $ Sales Tax -10% of (Selling Price + Accessories + External Finish) 3.Subtotal Subtotal = (Selling Price + Accessories + External Finish + Sales Tax) 4.Amount Due Amount Due = (Subtotal – Trade-in Allowance) Your Form must closely resemble this one: See the next slides for additional requirements. Due November 13, 2014 Points: 60 What you need to know to do this program: 1. Chapters 1,2,3,4,5,6 (Book and Notes) Radio buttons Check Boxes Don't forget this: Form1.Text. Place current date and time about here.

1.Do not allow bad input data to crash the program. Use try/catch blocks and IF-THEN-ELSE statements. Input errors must trigger an appropriate exception MessageBox. These exception messages must tell the data entry person what the error is and in which TextBox it occurred. For example, a message that simply tells the data entry person that “ Error made while entering data” is not sufficient. 2.Limit "Car's Sale Price" to $100,000. If $100,000 is exceeded, trigger an appropriate MessageBox and have the value re-entered. 3.Limit "Trade-in Allowance " to $50,000. If $50,000 is exceeded, trigger an appropriate MessageBox and have the value re-entered. 3.5 When an error occurs, change the backcolor of the appropriate textbox to yellow, UNTIL, the error is corrected. 4.Use good internal documentation. See class notes, and examples in this assignment. 5. Be sure to use the “.TOSTRING” method for all dollar amounts. Do not use FormatCurrency or FormatNumber. 6.Be sure to use correct data types for numeric calculations. 7.Use Option Strict On in your code. 8. You must use appropriate three-letter prefixes for variables, constants, and objects, such as Buttons, TextBoxes, etc. 9.Use good identifiers (constant names, variable names, object names, etc.). These should be as meaningful as possible, as short as possible, and as long as necessary. 10. Plan your project before writing code by writing out the steps necessary to solve the problem. 11. Be sure to use effective test data. This will insure that the program works correctly. 12.Set up click events that clear the appropriate input text box when clicked. This will allow easy re-entry of values if a typo is made. 13. Declare all constants at the module level of the code. 14.Declare all variables at the local level. 15. Use an appropriate Icon in your message boxes. See notes and book. 16.The Prices below must be CONSTANTS. ItemPrice Stereo System Leather Interior Computer Navigation1, StandardNo additional charge Pearlized Customized Detailing Tax Rate10% Programming Assignment 04 VB Auto Center Problem

Programming Assignment 04 VB Auto Center Problem OTHER REQUIREMENTS: 1.You MUST have these ten modules: You may have an eleventh module for a load event. 2. You MUST NOT use module-level variables. Module-level constants must be used. 3. Use arguments and parameters to pass data to and from modules. 4. NEVER USE ByRef except where necessary. Ask Dr. Scanlan for clarification on this if you don’t understand. 5. You may make-up your own variable names, procedure names, and argument/parameter names. FOLLOW THE RULES GIVE IN CLASS FOR IDENTIFIER NAMES. 6.NOTE: The red modules are all event procedures. 7. You must get the sales price and the trade-in allowance from the validate data module, ONLY.

Programming Assignment 04 VB Auto Center Problem MORE REQUIREMENTS: 8.You MUST use [#Region “text”/ #End Region] for all sections of code. 9. See EXIT code below to see where and how to place the Region blocks. 10.When a program is long, the Region blocks help organize your code. 11.ONLY, ONLY, ONLY use the two textboxes within the ValidateData module code. If you use one or both of these two textboxes in your code for “inputting” values other than the ValidateData module, you will get a zero (“0”) for this program. 12.You will also get a zero (“0”) for the program if you used a ByRef parameter when you could have use a ByVal parameter. 13.You must use Select Case instead of the If-Then-ElseIf in the Exterior Finishes Module. Failure to do this will result in a zero (“0”) for the program. This will give you practice with Select Case. 14.You will get a zero (“0”) for the program if you use module-level variables. 15.If the program fail to compile or is not on the CD, you will get a zero (“0”) for the program. Keep all files together. 16.Be sure to place current date and time on the form at the top.

Programming Assignment 04 VB Auto Center Problem Private Sub btnCalculate_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnCalculate.Click Dim … Dim blnErrorFlag As Boolean = False Call ValidateData(blnErrorFlag, decSalesPrice, decTradeInAllowance) If blnErrorFlag = True Then Exit Sub End If Call End Sub Outline for BOSS MODULE (Main Procedure) If there is an error in the Validate Data module, this code will keep the four Call statements from being executed.

DOCUMENTATION EXAMPLE ONLY YOU MUST FOLLOW THE DOCUMENTATION CHARACTERISTICS OF THE PROGRAMS ON THE NEXT FOUR SLIDES. DOCUMENTATION EXAMPLE ONLY

Below is an example of how documentation must be done. Don't forget to add comments in the code where appropriate. Don't forget to document all button subroutines (sub-procedures). DOCUMENTATION EXAMPLE ONLY

(Print) Last _________________________________First_______________________ MIS 15 section: Noon Program: (Circle) GRADING STANDARDSPOINTS Form-A Program 4 VB Auto Center Problem Documentation was done according to guidelines; and used #Regions (0 OR 2 point) __________ GUI is reasonably correct:(0 OR 2 point) __________ Followed rules for forming constant names & variable names:(0 OR 2 point) __________ ALL calculated values are correct under ALL checkbox and radio button conditions:(0 OR 10 points) __________ Exit and All Clear buttons work correctly:(0 OR 4 points) __________ Validation module works correctly with appropriate error messages(0 OR 20 points) __________ (You may have one extra module for the Form Load event.) Arguments and Parameters are used correctly. NEVER use ByRef when you could have used ByVal.(0 or 20 points) __________ TOTAL POINTS:______________ Failure to follow hierarchy chart for program organization. (-20) Textboxes only inputted values outside the Validate Data module: (-60) Failure to use option strict on in the code: ( -40) Program fails to compile for any reason: (-60) Program uses one or more module-level variables (- 60) Failure to use Select Case statement in Exterior Finishes Module (- 60) Program not on CD or DVD-R: (- 60) Failure to follow submission guidelines: (-10) 50 percent off of each class day late Program is late if not handed in during the first 10 minutes on the due date. Note: Because of some ambiguity in the form’s GUI vs. the instructions, the tax can be calculated with or without subtracting the trade-in allowance. Both ways will be accepted. The preferred method would be to calculate the tax without the trade-in allowance, as indicated in the directions. Grader Comments:

Program #2 Fall Form-B STUDENT FILLS IN THESE BLANKS: LAST NAME:_______________________________ FIRST NAME:________________________ PROGRAM (Circle) DATE DUE:_________________ DATE SUBMITTED:__________________ PLACE A CHECK NEXT TO THE FOLLOWING: 1.____Saved the Program on a CD or DVD-R using the following directory and sub-directory: Your Name\Program 04 2.____Printed your full name and program number on the CD or DVD-R using a permanent black marker. 3.____Submitted the CD or DVD-R in required envelope style not much larger than the CD or DVD-R. 4.____Placed the CD or DVD-R in the envelope. 5.____Cut out this form along dotted edges and TAPE it to the envelope. Use CD or DVD-R to submit program. CUT OUT THIS FORM ALONG THE DOTTED EDGES AND TAPE IT TO THE ENVELOPE. YOU MUST USE THIS STYLE THAT IS ABOUT THE SIZE OF YOUR CD. Do not lick to seal. Use metal clip. Program 4 VB Auto Center Problem