Hello. I really appreciate your answer. I have definitely gotten somewhere, but I am confused on how to code the rest. I also do not understand how to use the Array class in VB. An array is a line of code? This is what I have so far. I assume that prices in (prices.Length) is underlined green because I have not declared its value supposedly within the array? It states it is not assigned a value when I hover over it. My screenshot will show my coding form. There are also txtTotalItems_TextChanged and txtTotalSales_TextChanged missing from the screenshot at the end. I opened all pieces of the design form just to show what I named my labels and text boxes. I have 3 labels, Total Sales, Average Sale Price, and Total Items as well as three text boxes below each of those labels that have the exact same name. The text boxes' purpose is to showcase the values, however I do not know if this is correct and do not know where the array is going to go. I have a text box for the user to enter the prices, and two buttons, one the Submit Price button and one the Exit button.

Computer Networking: A Top-Down Approach (7th Edition)
7th Edition
ISBN:9780133594140
Author:James Kurose, Keith Ross
Publisher:James Kurose, Keith Ross
Chapter1: Computer Networks And The Internet
Section: Chapter Questions
Problem R1RQ: What is the difference between a host and an end system? List several different types of end...
icon
Related questions
Question

Hello. I really appreciate your answer. I have definitely gotten somewhere, but I am confused on how to code the rest. I also do not understand how to use the Array class in VB. An array is a line of code?

This is what I have so far. I assume that prices in (prices.Length) is underlined green because I have not declared its value supposedly within the array? It states it is not assigned a value when I hover over it. My screenshot will show my coding form. There are also txtTotalItems_TextChanged and txtTotalSales_TextChanged missing from the screenshot at the end. I opened all pieces of the design form just to show what I named my labels and text boxes. I have 3 labels, Total Sales, Average Sale Price, and Total Items as well as three text boxes below each of those labels that have the exact same name. The text boxes' purpose is to showcase the values, however I do not know if this is correct and do not know where the array is going to go. I have a text box for the user to enter the prices, and two buttons, one the Submit Price button and one the Exit button.


1
2
FWN
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
1 reference
Public Class FrmMain
O references
Private Sub btnExit_Click(sender
Me.Close()
1
End Sub
O references
Private Sub btnSubmit Price_Click(sender As Object, e As EventArgs) Handles btnSubmitPrice. Click
Dim prices() As Double
Declare an array to store prices
¹ Add the value entered in the TextBox to the array
ReDim Preserve prices (prices.Length)
prices (prices.Length - 1) = CDbl(txtPrices. Text)
End Sub
Object, e As EventArgs) Handles btnExit.Click
O references
Private Sub FrmMain_Load(sender As Object, e As EventArgs) Handles MyBase. Load
1
End Sub
O references
Private Sub lblAvgSale Price_Click(sender As Object, e As EventArgs) Handles lblAvgSalePrice. Click
1
End Sub
O references
Private Sub lblTotalSales_Click(sender As Object, e As EventArgs) Handles lblTotalSales. Click
End Sub
O references
Private Sub lblTotalItems_Click(sender As Object, e As EventArgs) Handles lblTotalItems.Click
1
End Sub
O references
Private Sub txtPrices_TextChanged(sender As Object, e As EventArgs) Handles txtPrices. TextChanged
1
End Sub
O references
Private Sub txtAvgSale Price_TextChanged(sender As Object, e As EventArgs) Handles txtAvgSale Price. TextChanged
1
End Sub
Transcribed Image Text:1 2 FWN 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 1 reference Public Class FrmMain O references Private Sub btnExit_Click(sender Me.Close() 1 End Sub O references Private Sub btnSubmit Price_Click(sender As Object, e As EventArgs) Handles btnSubmitPrice. Click Dim prices() As Double Declare an array to store prices ¹ Add the value entered in the TextBox to the array ReDim Preserve prices (prices.Length) prices (prices.Length - 1) = CDbl(txtPrices. Text) End Sub Object, e As EventArgs) Handles btnExit.Click O references Private Sub FrmMain_Load(sender As Object, e As EventArgs) Handles MyBase. Load 1 End Sub O references Private Sub lblAvgSale Price_Click(sender As Object, e As EventArgs) Handles lblAvgSalePrice. Click 1 End Sub O references Private Sub lblTotalSales_Click(sender As Object, e As EventArgs) Handles lblTotalSales. Click End Sub O references Private Sub lblTotalItems_Click(sender As Object, e As EventArgs) Handles lblTotalItems.Click 1 End Sub O references Private Sub txtPrices_TextChanged(sender As Object, e As EventArgs) Handles txtPrices. TextChanged 1 End Sub O references Private Sub txtAvgSale Price_TextChanged(sender As Object, e As EventArgs) Handles txtAvgSale Price. TextChanged 1 End Sub
Expert Solution
steps

Step by step

Solved in 4 steps with 3 images

Blurred answer
Recommended textbooks for you
Computer Networking: A Top-Down Approach (7th Edi…
Computer Networking: A Top-Down Approach (7th Edi…
Computer Engineering
ISBN:
9780133594140
Author:
James Kurose, Keith Ross
Publisher:
PEARSON
Computer Organization and Design MIPS Edition, Fi…
Computer Organization and Design MIPS Edition, Fi…
Computer Engineering
ISBN:
9780124077263
Author:
David A. Patterson, John L. Hennessy
Publisher:
Elsevier Science
Network+ Guide to Networks (MindTap Course List)
Network+ Guide to Networks (MindTap Course List)
Computer Engineering
ISBN:
9781337569330
Author:
Jill West, Tamara Dean, Jean Andrews
Publisher:
Cengage Learning
Concepts of Database Management
Concepts of Database Management
Computer Engineering
ISBN:
9781337093422
Author:
Joy L. Starks, Philip J. Pratt, Mary Z. Last
Publisher:
Cengage Learning
Prelude to Programming
Prelude to Programming
Computer Engineering
ISBN:
9780133750423
Author:
VENIT, Stewart
Publisher:
Pearson Education
Sc Business Data Communications and Networking, T…
Sc Business Data Communications and Networking, T…
Computer Engineering
ISBN:
9781119368830
Author:
FITZGERALD
Publisher:
WILEY