Programming with Microsoft Visual Basic 2017
8th Edition
ISBN: 9781337102124
Author: Diane Zak
Publisher: Cengage Learning
expand_more
expand_more
format_list_bulleted
Expert Solution & Answer
Want to see the full answer?
Check out a sample textbook solutionStudents have asked these similar questions
In order to access each element in an array, the For...Next statement needs to know the highest subscript in the array. True or False?
Which of the following displays the number of elements contained in theintItems array?a. lblCount.Text = intItems.Lenb. lblCount.Text = intItems.Lengthc. lblCount.Text = Length(intItems)d. lblCount.Text = intItems.NumElements
Which of the following will repeat the loop instructions for each row in atwo-dimensional array named intNum?a. For intRow As Integer = 0 To intNum.GetUpperBound(0)b. For intRow As Integer = 0 To intNum.GetUpperBound(1)c. intRow = 0Do While intRow < intNum.GetUpperBound(0)d. both b and c
Chapter 8 Solutions
Programming with Microsoft Visual Basic 2017
Knowledge Booster
Similar questions
- If the intNums array contains six elements, which of the following statements assigns the number 6 to the intElements variable? intElements = Len(intNums) intElements = Length(intNums) intElements = intNums.Len intElements = intNums.Lengtharrow_forwardThe intNums array is declared as follows: Dim intNums() As Integer = {10, 5, 7, 2}. Which of the following blocks of code correctly calculates the average value stored in the array? The intTotal, intSub, and dblAvg variables contain the number 0 before the loop is processed. a. Do While intSub < 4 intNums(intSub) = intTotal + intTotal intSub += 1 Loop dblAvg = intTotal / intSub b. Do While intSub < 4 intTotal += intNums(intSub) intSub = intSub + 1 Loop dblAvg = intTotal / intSub c. Do While intSub < 4 intTotal += intNums(intSub) intSub += 1 Loop dblAvg = intTotal / intSub – 1 d. Do While intSub < 4 intTotal = intTotal + intNums(intSub) intSub = intSub + 1 Loop dblAvg = intTotal / (intSub – 1)arrow_forwardWhich of the following adds the number 20 to the value stored in the first row, second column of the decSales array?a. decSales(0, 1) += 20b. decSales(1, 2) = decSales(1, 2) + 20c. decSales(1, 2) += 20d. both b and carrow_forward
- Write a statement that assigns the number 7 to the element located in the third row, first column in the intQuantities array.arrow_forwardThe decSales array is declared using the Dim decSales(4) As Decimal statement. Which of the following loops will correctly add 100 to each element in the array?a. intX = 0 Do While intX <= 4 decsaes (intX) = decSales(intX) + 100 intX = intX + 1 Loopb. For intSubscript As Integer = 0 To 4 decSales(intSubscript) += 100 Next intSubscriptc. intX = 0 Do decSales(intX) = decSales(intX) + 100 intX = intX + 1 Loop Until intX > 4d. all of the abovearrow_forwardCreate a Windows Forms application. Use the following names for the project and solution, respectively: Shipping Depot Project and Shipping Depot Solution. The Shipping Depot store ships packages by FedEx, UPS, and USPS, Create the interface shown in Figure 8-50; the interface contains a group box, 11 labels, and two buttons. The Display button's Click event procedure should declare a two-dimensional array that contains four rows (one for each week) and three columns (one for each shipper). Initialize the array using the data shown in Figure 8-50. The procedure should display the total number of packages shipped, the total shipped by FedEx, the total shipped by UPS, and the total shipped by USPS. It should also display the percentage of the total number shipped by each of the different shippers. Display the percentages with a percent sign and no decimal places. Code the application. Save the solution and then start and test the application.arrow_forward
- An array is declared using the statement Dim inventory(4) As Product. Which of the following statements assigns the number 100 to the intQuantity member variable contained in the last array element? inventory(3).intQuantity = 100 inventory(4).Product.intQuantity = 100inventory(4).intQuantity=100inventory.intQuantity(4) = 100arrow_forwardCreate a visitors application that prompts the user for the number of visitors each day for the past 5 days and then displays the average number of visitors per day. (use & to accept new value) Use PL/SQL Array (NUMBER type basic composite array type ) and array has to have 5 members only. The application output should look like same as following: Test: If you receive below numbers from user then your average should be 234. Display avarage on screen. 1: 150 2: 220 3: 180 4: 300 5: 320 The average number of visitors is: 234 Hint : Once you create Array DECLARE TYPE my_array_type IS TABLE OF number INDEX BY PLS_INTEGER; v_n_array my_array_type; Then in the BEGIN and END block accept new value for each array members. DO NOT Use LOOP to accept new & as it is not design to get new value via loop.. Instead use separate 5 different &substitution value to get each values from user input BEGIN…arrow_forwardThe above screen is used to browse the products table it uses the ProductDAO.java file, it calls the getProductByCriteria() function which should accept a parameter, this parameter should be the criteria that would be built from the two combo boxes and the text box, and queries the products table.The getProductByCriteria() function should return a list of Product objects that matches the criteria specified. Modify the function so that it accepts a string paramater consisting of the fields from the combo boxes and a price number from the text box separated by commas and use this string to modify the query in the function to return the desired result set. public List<Product> getProductByCriteria() //MAKE MODIFICATIONS TO THIS FUNCTION SO IT CAN TAKE PARAMETER(S) { if (openConnection()) { try{ List<Product> items = new ArrayList <> (); Product temp = null; String…arrow_forward
- The dblNums array is a six-element Double array. Which of the following If clauses determines whether the entire array has been searched? a. If intSub = dblNums.Length Then b. If intSub <= dblNums.Length Then c. If intSub > dblNums.GetUpperBound(0) Then d. Both a and c.arrow_forwardWrite a statement that assigns the highest column subscript in the intOrders array to the intLastColSub variable.arrow_forwardThe intCounters array contains five elements. Which of the following assigns the number 1 to each element? a. For intSub As Integer = 0 To 4 intCounters(intSub) = 1 Next intSub b. Dim intSub As Integer Do While intSub < 5 intCounters(intSub) = 1 intSub += 1 Loop c. For intSub As Integer = 1 To 5 intCounters(intSub - 1) = 1 Next intSub d. All of the above.arrow_forward
arrow_back_ios
SEE MORE QUESTIONS
arrow_forward_ios
Recommended textbooks for you
- Programming with Microsoft Visual Basic 2017Computer ScienceISBN:9781337102124Author:Diane ZakPublisher:Cengage Learning
Programming with Microsoft Visual Basic 2017
Computer Science
ISBN:9781337102124
Author:Diane Zak
Publisher:Cengage Learning