success error

Form Is Invalid!

Get Guided BIS311 Lab 6

Get Guided BIS311 Lab 6

 

Lab 6 of 7: User-Interface Validation in Visual Basic (40 Points)
Submit your assignment to the Dropbox located on the silver tab at the top of this page.
(See Syllabus “Due Dates for Assignments & Exams” for due dates.)
L A B O V E R V I E W
Scenario and Summary
In this lab, you’ll implement a program that accepts an OrderAmount and a SalesTax figure through text boxes.
The form you will create for this program will look like this.
The program should work as follows: When the user presses the button, the button-click event executes several selection structures that check the textboxes for validity. They check if the order amount is numeric and if the sales-tax percent is both numeric and between 0 and 0.14. If the data are invalid, error messages are displayed in the Listbox. If the data are valid, the OrderCalculator class you implemented in the previous week is used to calculate the order total.
Here is what the form looks like with invalid input.
Here is what it looks like with valid input.
The OrderCalculator class is provided for you; all you have to do is add it to your Visual Basic project, design the user interface, and then create the Visual Basic code for the button-click event.
Deliverables
Section
Deliverable
Points
Step 9
Lab6YourFirstLastName.docx (Word document) Screenshot of Windows form Screenshot of button_click event code
40
Category
Points
%
Add the existing OrderCalculator class to your project.
7
17.5%
Create a form.
5
12.5%
Set the form and control properties, as instructed.
5
12.5%
Code the button-click event.
10
25%
Run and test the program.
3
7.5%
A form with invalid input and a validation message
5
12.5%
A form with valid input
5
12.5%
Total
40
100%
L A B S T E P S
Preparation
1. Get the OrderCalculator class code from Doc Sharing.
o Go to Doc Sharing and download the file called OrderCalculator.vb to the root directory of your computer’s C: drive or the root directory of your USB drive. By the root directory, we mean the top-level folder on your machine, called C: for the C: drive or something like E: for your USB drive (the drive letter may vary for the USB drive). TIP: Don’t put the OrderCalculator.vb file on your desktop or in a folder somewhere; put it in the root directory of your C: or USB drive. This will make it easier to access from within Visual Studio later.
2. Log onto the Citrix Server and launch Visual Studio 2010.
L A B S T E P S
STEP 1
Start a new Visual Basic Windows Forms Application Project, and name it Lab6YourName.
L A B S T E P S
STEP 2
In the Solution Explorer, pull down the Project menu and select Add Existing Item.
An Add Existing Item dialog box will appear.
L A B S T E P S
STEP 3
Click on the Computer in the left pane to show the available drives. If you saved the OrderCalcator.vb file that you downloaded earlier to your C: drive, then double-click the C$ (\Client) (V: ) drive, which selects the root directory of your home computer. If you saved OrderCalculator.vb to your USB drive, then double-click the drive with the drive letter of your USB drive, followed by a $. For example, if your USB drive is E: double-click the E$ (\Client) drive in Citrix. You should get this dialog box, which might have different folders and files than those shown below. However, there should be an OrderCalculator.vb file in it, as shown.
L A B S T E P S
STEP 4
Select the OrderCalculator.vb file you placed there earlier, and click Add. Your Solution Explorer should now look like this.
L A B S T E P S
STEP 5
Double-click on Form 1. vb, form, and design it by dragging controls from the Toolbox so that it looks like this, with two textboxes, two labels, a button, and a list box. (If necessary, refer to the more detailed directions in previous labs for help with designing the form.) Stretch the form and the Listbox to the right so that they are fairly wide. This will allow the Listbox to display error messages all on one line later on.
L A B S T E P S
STEP 6
Set the following properties of the controls in the Properties window.
Control
Property
Setting
Form1
Text
Lab6YourFirstLastName
Label1
Text
Order Amount
Label2
Text
Sales Tax Percent
Button1
Text
Calculate the Total After the Discount
Textbox1
Name
txtOrderAmount
Textbox2
Name
txtSalesTax
Listbox1
Name
list messages
If necessary, widen the button to show all of the words in its Text property. Your form should now look like this.
L A B S T E P S
STEP 7
Double-click on the button to get to its click event. Put your name and the lab number in the comments at the top of the screen.
Then, enter the following Visual Basic code that performs the required data validation and either displays an error message or uses the OrderCalculator class to calculate and display the result.
L A B S T E P S
STEP 8
Run the program, and test it for errors. Try entering invalid data into the form so that you can see how it handles empty textboxes, text-based values, or numbers out of the specified sales-tax range. (See the Scenario and Summary section at the beginning of this lab for examples of what the form should look like with invalid input and with valid input.)
L A B S T E P S
STEP 9
Create a word document called Lab6YourFirstLastName.docx, and paste screenshots of the form and the code for your button-click event into it. Save the Word document file, and submit it to the Lab 6 Dropbox.

Want a Guide to Labs?

We recognize the dire scenario of university college students. If you are wondering, can I pay someone to do my exam, then we have got given you covered. Time is of the essence, and university college students can not take any possibilities concerning exams. To help our university college students in the one’s circumstances, we have got updated our operations from an hourly basis to 24/7, addressing university college students’ pay-a-man or woman-to-take exam now concerns. Our specialist’s artwork round the clock on your order. Moreover, our customer representatives are continuously online to soak up your hire for someone to take my examination queries. Get online classes, examinations, and direct assistance from Get Exam Done.

Placeholder $3.99
Get Guided BIS311 Lab 6
  • 200+ Downloads
  • 8k Views