Program 03 Fall 2014 VB Auto Center Problem Purpose: VB Auto Center has ask you to write a program...

13
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 sale of their cars. It must calculate the following: 1. The total amount for Accessories and External Finish. Accessory Prices: - Stereo System = $400.00 - Leather Interior = $600.00 - Computer Navigation = $1,000.00 Exterior Finish Prices: - Standard Finish = No additional charge - Pearlized Finish = $500.00 - Customized Detailing = $300.00 2. Sales Tax - 10% of (Selling Price + Accessories + External Finish – Trade-in Allowance) 3. Subtotal Subtotal = (Selling Price + Accessories + External Finish – Trade-in Allowance 4. Amount Due Total Price= (Subtotal + Sales Tax) Your Form must closely resemble this one: See the next slide for additional requirements. Note: You may use module level variables and constants. Radio buttons Check Boxes Don't forget this: VB Auto Center. TOTAL POINTS: 50 DUE: OCTOBER 28

Transcript of Program 03 Fall 2014 VB Auto Center Problem Purpose: VB Auto Center has ask you to write a program...

Page 1: 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.

Program 03 Fall 2014VB Auto Center Problem

Purpose:VB Auto Center has ask you to write a program that will calculate the typical values involved in the sale of their cars. It must calculate the following:1. The total amount for Accessories and External Finish.

Accessory Prices:- Stereo System = $400.00- Leather Interior = $600.00- Computer Navigation = $1,000.00

Exterior Finish Prices:- Standard Finish = No additional charge- Pearlized Finish = $500.00- Customized Detailing = $300.00

2. Sales Tax- 10% of (Selling Price + Accessories +

External Finish – Trade-in Allowance)3. Subtotal

Subtotal = (Selling Price + Accessories +External Finish – Trade-in Allowance

4. Amount DueTotal Price= (Subtotal + Sales Tax)

Your Form must closely resemble this one:

See the next slide for additional requirements.Note: You may use module level variables and constants.

Radio buttonsCheck Boxes

Don't forget this: VB Auto Center.

TOTAL POINTS: 50DUE: OCTOBER 28

Page 2: 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.

FOR THIS ASSIGNMENT IGNORE item 1 BELOW. WE WILL ADD THIS FOR THE NEXT ASSIGNMENT.1. Limit "Car's Sale Price" to $100,000. If $100,000 is exceeded, trigger an appropriate MessageBox and have the value re-entered. Limit "Trade-in Allowance " to $50,000. If $50,000 is exceeded, trigger an appropriate MessageBox and have the value re-entered.

2. Use good internal documentation. See class notes, and examples in this assignment . 3. Be sure to use the FormatCurrency function for dollar amounts and FormatNumber for other amounts.4. Be sure to use the supplied values for module level variables and constants.5. Use Option Strict On in your code.6. You must use appropriate three-letter prefixes for variables, constants, and objects, such as Buttons, TextBoxes, etc.7. Use good identifiers (constant names, variable names, object names, etc.) . These should be as meaningful as possible and as short as possible, but as long as necessary.8. Follow the outline for the program on the next three pages. You must use REGIONS.9. Be sure to use effective test data. This will insure that the program works correctly.10. Set up two click events that clear the appropriate input text box when clicked. This will allow easy re-entry of values if

a typo is made. The click event must clear the textbox and reset the background color to white.11. Declare all constants at the module level of the code.12. Declare all variables at the module level.13. Validate Data module must do the following:

Set the textbox backgrounds to yellow when an error occurs.You must have a separate TRY/CATCH for each textboxAppropriate error messages must be given for invalid casts.The user must be informed as to which textbox caused the error.

14. The Prices below must be CONSTANTS.Item PriceStereo System 400.00Leather Interior 600.00Computer Navigation 1000.00Standard Finish No additional chargePearlized Finish 500.00Customized Detailing 300.00SalesTax Rate 10%

Programming Assignment 02 PART-2VB Auto Center Problem

Page 3: 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.

Program 03VB Auto Center Problem

Ignore this line. It is from an older version of VB.

You must use these modules and regions.

TOTAL POINTS: 50

Change this to: “EXTERIOR FINISH CHARGE”because there is only one charge.

Page 4: 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 Assignment 02 PART-2VB Auto Center Problem

You must use thesevariable names.

You must use theseconstant names andvalues.

Add this constant.

Page 5: 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 Assignment 02 PART-2VB Auto Center Problem

You must use these namesfor the procedures.

Change this to: ExteriorFinishCharge

Page 6: 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.

Use this code for your Validate Data Module

Page 7: 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 Assignment 02 PART-2VB Auto Center Problem

This is the procedure for selecting an Exterior Finish Charge

Stude

nts:

Note

the

Case

Structu

re

Page 8: 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.

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

DOCUMENTATION EXAMPLE ONLY

DOCUMENTATION EXAMPLE ONLY

Page 9: 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.

DOCUMENTATION EXAMPLE ONLY

DOCUMENTATION EXAMPLE ONLY

DOCUMENTATION EXAMPLE ONLY

Page 10: 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.

DOCUMENTATION EXAMPLE ONLY

DOCUMENTATION EXAMPLE ONLY

DOCUMENTATION EXAMPLE ONLY

Page 11: 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.

************************************************************************************************************************************* 'Program Name: Video Sales Calculator 'Version: 1.00 'Programmer/s: Dr. David Scanlan 'Date: August 15, 2010 'Purpose: Calculates the total amount due for each customer renting videos. ' Validates all input data. '************************************************************************************************************************************* Option Strict On Public Class frmVideo Inherits System.Windows.Forms.Form #Region " Windows Form Designer generated code " 'DECLARATION SECTION '*********************************************************************************************************************************** ' -- Declares Variables at the module level. ' -- Declares Constants at the module level. '*********************************************************************************************************************************** Dim mdecItemAmount As Decimal Dim mdecTotalAmountDue As Decimal Const mdecDISCOUNT As Decimal = 0.1D Const mdecNEW_DVD_CHARGE As Decimal = 4D Const mdecNEW_VHS_CHARGE As Decimal = 3.5D Const mdecDVD_CHARGE As Decimal = 3.5D Const mdecVHS_CHARGE As Decimal = 3D 'CALCULATES AMOUNT DUE '*********************************************************************************************************************************** ' -- Calculates amount due for all rentals. ' -- Validates input data. '*********************************************************************************************************************************** Private Sub btnCalculate_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnCalculate.Click 'Calculate the amount due for rentals. End Sub

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

DOCUMENTATION EXAMPLE ONLY

DOCUMENTATION EXAMPLE ONLY

Page 12: 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.

NAME of team leader: (Print) Last ___________________________ First__________________

MIS 15 section: Noon ClassTeam number: 1 2 3 4 5 6 7 8 9 10 11 12(Circle)

GRADING STANDARDS ALL OR NOTHING POINTS

Form-A Form-AProgram 3 VB Auto Center Problem

Documentation was done according to guidelines: (0 TO 3 points) __________GUI is reasonably correct: (0 TO 2 points) __________ Followed rules for forming constant names & variable names: (0 TO 2 points) __________Used option strict on in the code: (0 TO 8 points) __________ALL calculated values are correct under ALL checkbox and radio button conditions: (0 TO 15 points) __________Exit and All Clear buttons work correctly: (0 T0 5 points) __________Validation module works correctly (0 TO 10 points) __________Textboxes were only referenced in the Validate Data module (0 TO 5 points) __________

TOTAL POINTS: 50 __________

Program fails to compile for any reason: -50Program not on CD: - 50Failure to follow submission guidelines: -1050 percent off of each class day lateProgram is late if not handed in during the first 10 minutes on the due date.

Grader Comments:

Page 13: 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.

Program #2 Fall 2011

13

Form-B Form-B

STUDENT FILLS IN THESE BLANKS:

LAST NAME:_______________________________

FIRST NAME:________________________

PROGRAM (Circle) 1 2 3 4 5 6 7 8DATE DUE:_________________DATE SUBMITTED:__________________

PLACE A CHECK NEXT TO THE FOLLOWING:

1. ____ Saved the Program on a CD using the following directory andsub-directory: Your Name\Program 03

2. ____ Printed your full name and program number on the CD using a

permanent black marker.3. ____ Submitted the CD in required envelope style not much larger

than the CD.4. ____ Placed the CD in the envelope.5. ____ Cut out this form along dotted edges and TAPE it to the

envelope.(You can also use a DVD-R)

CUT OUT THIS FORM ALONG THE DOTTED EDGES AND TAPE IT TO THE ENVELOPE.

YOU MUST USE THIS STYLE THAT IS ABOUTTHE SIZE OF YOUR CD or DVD.Note: You can also use a self-sealing seal.Do not lick to seal. Usemetal clip or self-sealing envelope.

Program 3 VB Auto Center Problem