New Semester
Started
Get
50% OFF
Study Help!
--h --m --s
Claim Now
Question Answers
Textbooks
Find textbooks, questions and answers
Oops, something went wrong!
Change your search query and then try again
S
Books
FREE
Study Help
Expert Questions
Accounting
General Management
Mathematics
Finance
Organizational Behaviour
Law
Physics
Operating System
Management Leadership
Sociology
Programming
Marketing
Database
Computer Network
Economics
Textbooks Solutions
Accounting
Managerial Accounting
Management Leadership
Cost Accounting
Statistics
Business Law
Corporate Finance
Finance
Economics
Auditing
Tutors
Online Tutors
Find a Tutor
Hire a Tutor
Become a Tutor
AI Tutor
AI Study Planner
NEW
Sell Books
Search
Search
Sign In
Register
study help
computer science
programming microsoft visual basic
Microsoft Visual Basic 2017 For Windows Web And Database Applications 1st Edition Corinne Hoisington - Solutions
Using the database table in Figure 10-60, what value would be assigned to strLocation in the code in Figure \(10-63\) ? strLocation = Convert.ToString (datShop. Rows (2) ("Location")) FIGURE 10-63
The purpose of \( \qquad \) is the separation of processing and hiding data within different classes.
What are the names of the three tiers in a three-tiered program structure? What occurs in each of the three tiers?
What property can you use to specify the sequence of objects that will be selected when the user presses the TAB key?
What property is used to ensure that the user has entered only numbers in a flight number MaskedTextBox object?
In a three-tiered program structure, which tiers are allowed to communicate with each other?
Identify the three steps to create a new class in a Visual Basic program.
When is a class constructor executed?
Write the code to instantiate the objAthlete object based on the Olympic class.
Write the code to instantiate the objEscapeRoom object based on the Escape class and to pass the following values to the object: City, RoomTheme, Cost, GroupSize. Write the New statement in the Escape class.
Write a statement to call the TrainTicket procedure in the objOffPeak object assigned to the variable decTrainCost.
Explain the benefits of using separate classes in a program.
Complete the following sentence: Inheritance allows one class to inherit \( \qquad \) and \( \qquad \) from another class.
Describe the difference between a base class and a subclass when using inheritance.
What entry must be included in the Class statement of a subclass?
What is the first statement that must be coded in a subclass constructor?
What is an overridable procedure? Why is it used?
In a class, can an attribute be referenced that is not defined in the class? How is this attribute reference resolved?
Rewrite the following names in a comma-delimited text file format:Aragorn Bilbo Baggins Boromir Frodo Gandalf Pippin
When an IO.StreamWriter is created, what does the IO.File.AppendText entry mean?
Which procedure in the IO.StreamWriter class writes a field and begins a new line, or record, in the text file?
The code in Figure 11-52 executes when a button is clicked on a Windows Form object. Identify what will happen when a single error occurs. What happens if two errors occur at the same time? What happens if three errors occur at the same time? 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34
Examine the following code and make any corrections required. CALLING CLASS 62 Dim objSubClass As New Subclass (txtLastName, txtNumber Of Dependents) 63 OBJSUBCLASS 4 Sub New (ByVal LastName)
Correct the following code. 4 Dim objWater As WaterName 5 WaterName = New WaterName
Referencing Exercise 3 above, correct the following statement: 22 lblWater = GetWater.obj Water
What is the output of the following code? Private Sub btnFives_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnFives. Click End Sub Dim intCount As Integer For intCount = 1 To 5 Next Calculate Fives (intCount) Private Sub CalculateFives (ByVal intCountValue As Integer)
What is the output of the following code? Private Sub btnJoke_Click(ByVal sender As System.Object, ByVal e As System. EventArgs) Handles btnJoke. Click End Sub DisplayRiddle () DisplayAnswer() Private Sub DisplayAnswer() End Sub lblAnswer.Text = "Yesterday, Today, and Tomorrow." Private Sub
The following program contains the procedure declaration. Write the Function call statement that assigns the returned value to intTriple and passes a variable named intValue. Private Function Cube (ByVal intNum As Integer) As Integer Return intNum * int Num intNum End Function *
Using implicit sizing, assign the integers \(2,3,5,7,11\), and 13 to an array named intPrimeNumbers.
What is the upper-bound index of an array whose size is 52 ?
Write a statement that assigns the length of an array named strBroadwayPlay to a variable named intSignCount.
Write a line of code that initializes an array named intEven with the first five even numbers, starting with 0 .
Answer the following questions about the following initialized array: Dim strSeafood(8) as Stringa. Assign Oysters to the first array location. What is the index number?b. Assign Lobster to the fourth location in the array. What would the assignment statement look like?c. What value does
Can you have a Boolean data type array?
Write a line of code that assigns the values Jon Snow, Tyrion Lannister, and Cersei to the elements in the array strGameOfThrones().
Which of the three main characters in question 7 would be assigned to strGameOfThrones(1)?
What is the lower index of an array?
Write a statement that assigns the length of an array named intMovieTimes to intSpan.
Write a statement that assigns the elements shown in Figure 8-87 to a two-dimensional array with implicit sizing named intPinNumbers. 1659 2916 9876 3928 1117 9665 5397 4488 1211 0767 2956 2041 FIGURE 8-87
How many elements can be stored in the array in Figure \(8-88\) ? Dim decRoomSize (4, 6) As Decimal FIGURE 8-88
Write a statement that assigns the value 16.7 to the last item in the array in question 12 .
Write a statement that assigns the first line of an opened text file to the first element in an array named strHobbit.
Write a statement that opens a text file named d:\accesscodes.txt and assigns the instance of the StreamReader to objReader.
Write a Sort statement to sort an array named strZipCodes.
If a binary search returns a negative value, what does that mean?
What is the default value of the elements in an array called intTopSpeed()?
Write the statement that hides the Windows Form object that is currently open in an application.
Write the statement that would initialize the variable intFinalExam as a Public Shared class-level variable that can be accessed in other Windows Form objects.
Correct the lines of code in Figure 8-89. Dim intJellyBeans () As Integer = (23, 77, 89, 124, 25) ReDim intJellyBeans (10) As Integer FIGURE 8-89
Correct the line of code in Figure 8-90. Dim strHighwayNumbers () As String = (95, 81, 605, 5} FIGURE 8-90
Rewrite the code shown in Figure 8-91 to fix any errors. Dim strFriends (4) => {"Brea", "Eric", "Daniel", "Ryan", "Brittany"} FIGURE 8-91
What exception would be produced by the code shown in Figure 8-92? Dim int Plane Type (300) As Integer Dim intCount As Integer For intCount = 0 To 301 Next int PlaneType (intCount)=767 FIGURE 8-92
Rewrite the code in Figure 8-93 to read each line of a text file into an array named strFordModel. Do While objReader. Peek = -1 strFordModel (intCount) int Count + 1 Loop FIGURE 8-93 objReader.ReadLine()
Rewrite the statement in Figure 8-94 to fix the error. Dim intEvenNumbers (4), (8) As Integer FIGURE 8-94
Explain how the two statements shown in Figure 5-84 are evaluated. If strAirline = "Jet Green" AndAlso strHotel = "Homeland Suites Then If atrAirline "Jet Green" And strHotel "Homeland Suites" Then FIGURE 5-84
Identify the error in the code shown in Figure 5-85 and explain how to correct the code. If dblCommission >= 2500 Then Dim intBonus As Integer Else int Bonus = 500. intBonus = 0 End If FIGURE 5-85
The Select Case statement shown in Figure 5-86 contains one or more errors. Identify the error(s) and rewrite the statements correctly. Select Case intNumberOfSeats. Case 5000 strVenueType = "Stadium" Case 2000 strVenueType = "Amphitheater" Case >1000 strVenueType = "Auditorium" Case > 200
The Select Case statement shown in Figure 5-87 contains one or more errors. Identify the error(s) and rewrite the statements correctly. Select Case charFlightCode Case 'P', 'A' lblFare.Text = 'First Class' Case 'B', 'Q' lblFare.Text = 'Business Class' Case 'Y', 'S', 'M' lbl Fare.Text Full Fare
The If ... Then . . . Else statement shown in Figure 5-88 contains one or more errors. Identify the error(s) and rewrite the statements correctly. If strShippingMethod "Overnite" Then If strDeliveryTime = "Morning" Then decDeliveryCost 29.00D Else Else decDelivery Cost 24.00D If strShippingMethod =
Write an If . . . Then decision structure to compare the two numbers in the decDeveloperPay and decWebDesignerPay variables. Display a message box that states decDeveloperPay is greater than decWebDesignerPay.
Write an If statement that displays the message box "A Day's Drive" if the value in the variable decMiles is within the range from 300 to 599.
Write an If . . . Then . . . Else statement that checks the value in the variable chrGender for the value M (Male) or \(\mathrm{F}\) (Female) and assigns the information shown in Figure 5-89 to lblCollegeExpectation.Text based on the gender. If the variable chrGender contains a value other than
Write a Select Case statement that tests the user's age in a variable named intAge and assigns the generation name of that age group to the variable strGeneration, according to the information shown in Figure 5-90. Age Group Generation Name 50 and above Baby Boomers 39-49 Generation X 18-38
Rewrite the Select Case statement shown in Figure 5-91 as an If . . . Then . . . Else statement. Select Case chrDepartment Case "B", "b" strDept "Baby Infant Clothing" Case "T", "t" strDept "Technology" End Select FIGURE 5-91
In each of the following examples, is the condition True or False?a. "CVCC" \(>=\) "GRCC"b. "G" \(>=\) "g"c. "Nerdy"< "Nerd"d. "Cool" "cool"e. " 50 " \(>=\) "Fifty"f. ("Paris" < "Barcelona") And ("Amsterdam" "Chevrolet") Or ("Toyota" < "Honda")h. \(3 \wedge 2
Write a statement that displays the default value of \(\$ 5.49\) in the input box shown in Figure 6-101 and assigns the return value from the InputBox function to a variable named decPizzaSlice with the message Cost of Pizza Slice with the title Giordano's Pizza. Giordano's Pizza Cost of Pizza
Write compound operators for the following equations:a. intStrike \(=\) intStrike +10b. dblCube \(=\) dblCube \(^{\wedge} 3\)c. \(\operatorname{strDog}=\operatorname{str} D o g \&\) "Treat"d. decOvertime \(=\) decOvertime \(* 1.5\)
Write For...Next loops that calculate the sum of the following ranges and assign their sum to a variable named intSum:a. The first 50 numbers starting with 0b. The even numbers beginning at 10 and ending with 100c. The numbers \(20,30,40,50,60,70\) and 80
Find the error(s) in the following For...Next header statements:a. For intCounter = "1" To "19"b. For strNumber \(=98\) To 71 Step 2c. For int Value \(=12\) To 52 Step -4
Explain the purpose of placing an ampersand before or within a MenuStrip item.
Write a command to add a list of precipitation types to a ListBox object named 1stWater.
Write the command to clear a ListBox object named 1stWinners.
What is the name of the property that displays an image as the background of a Form object?
What is the name of the property that can be used to stretch the background image of the Form object?
Using a compound operator, write an assignment statement to decrease the value in intCounter by 6.7.
Write a top-controlled Do Until loop with an empty body that would continue until intValue is less than 19.
Write a bottom-controlled Do While loop with an empty body that continues while the user enters "Yes" into the strContinue variable.
Write a Do While loop to validate that the user enters a nonzero integer into an input box for a variable named intDenominator.
Is the For...Next loop top-controlled or bottom-controlled?
Write the code for an infinite Do Until loop with the variable intForever.
Which loop should be used if you know the required number of times the loop will be executed?
What is the fewest number of times a top-controlled Do Until loop is executed?
Write a data validation Do loop to check that the variable intValidAge entered from an input box is between 1 and 118 .
A loop inside another loop is called a . \( \qquad \)
When you insert standard items in a MenuStrip object, what File menu items are automatically created by default?
The loop shown in Figure 6-102 should repeat 10 times. If it will not repeat 10 times, change the code so it will. 7 9 881 For intRepeat Next 20 To 10 MsgBox("The value is " & int Repeat. ToString("CO")) FIGURE 6-102
What output does the code shown in Figure 6-103 produce? How would you change the code to produce a list box containing the values \(12-22\) ? intRate 12 Do While intRate
What is the output of the code shown in Figure 6-104? Dim intAdd As Integer Dim intOuterLoop As Integer Dim int InnerLoop As Integer intAdd 0 10 11 12 13 14 5638901234 Next: For intOuter Loop = 1 To 8 For int InnerLoop = 3 To 7 intAdd + 1 Next MsgBox.Show("The final value is " & intAdd.ToString())
What is the output of the code shown in Figure 6-105? 33 34567000 Dim intValue As Integer intValue = 2 Do While intValue
Fix the errors in the loop shown in Figure 6-106. 41 42 43 44 45 Dim intStart As Integer = 8 Loop intStart = +4 Do While intStart < 24 FIGURE 6-106
What is the output of the code shown in Figure 6-107? 53 54 55 Un in un un in 657 56 57 intCount = 40 Do Until intCount < 26 Loop intCount - 2 1stCount.Items.Add(int Count) FIGURE 6-107
What is the value of lblResult after the code shown in Figure 6-108 is executed? Dim intCounter As Integer = -15 Do While intCount < 25 intCount += 5 lblResult.Text & intCount.ToString() & " 73 74 75 76 77 78 Loop FIGURE 6-108
What is the value of lbIResult after the code shown in Figure 6-109 is executed? 00 00 00 00 00 00 00 80 81 82 83 84 85 0123456 86 Dim intCountIt As Integer int Count It 6 Do int Count It += 3 lblResult. Text & Loop Until intCountIt = 21 int Count It.ToString() & "" FIGURE 6-109
Rewrite the top-controlled Do While loop shown in Figure 6-110 as a top-controlled Do Until loop. 88 89 90 91 92 93 Dim intQuantity As Integer intQuantity = -5 Do While intQuantity < 30 int Quantity += 5 Loop FIGURE 6-110
Convert the Do loop shown in Figure 6-111 to a For...Next loop. 95 96 97 98 999900 7696H 99 100 Dim intIncrease As Integer intIncrease = 10 Do While intIncrease
How many times will the inner statement inside the nested loop in Figure 6-112 be executed? 103 104 105 106 For intOuterLoop 3 To 5 For intInner Loop = 6 To 10 1stDays.Items.Add("Value: " & intOuterLoop.ToString() & "Count: & intInnerLoop. ToString()) 107 Next 108 Next FIGURE 6-112
Write a For...Next loop that adds the odd numbers 1 through 49 and assigns their sum to the variable intSum. The program should start with the lines shown in Figure 6-113 (use the variables shown in lines \(120-123\) in your code). 120 121 122 123 124 125 126 127 Dim intLoopValue As Integer Dim
What is the name of the screen that displays a logo and version number of an application allowing the program to load?
Name the two types of procedures.
Write the line of code that would display frmSplash1 for approximately six seconds.
Showing 200 - 300
of 831
1
2
3
4
5
6
7
8
9
Step by Step Answers