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 with microsoft visual basic 2015
Bundle Programming With Microsoft Visual Basic 2015 7th + Mindtap Programming 1 Term Printed Access Card 7th Edition Diane Zak - Solutions
1. Which of the following declares a five-element one-dimensional array?a. Dim intSold(4) As Integerb. Dim intSold(5) As Integer = {4, 78, 65, 23, 2}c. Dim intSold() As Integer = {4, 78, 65, 23, 2}d. both a and c
13. Open the Debug Solution (Debug Solution.sln) file contained in the VB2015\Chap08\Debug Solution 3 folder. Open the Code Editor window and review the existing code.Start and then test the application. Notice that the application is not working correctly.Correct the application’s code, and then
12. Open the Debug Solution (Debug Solution.sln) file contained in the VB2015\Chap08\Debug Solution 2 folder. Open the Code Editor window and review the existing code.Start and then test the application. Notice that the application is not working correctly.Correct the application’s code, and then
11. Open the Debug Solution (Debug Solution.sln) file contained in the VB2015\Chap08\Debug Solution 1 folder. Open the Code Editor window and review the existing code.Start and then test the application. Notice that the application is not working correctly.Correct the application’s code, and then
10. Open the VB2015\Chap08\Count Solution\Count Solution (Count Solution.sln) file.The interface provides a text box for the user to enter a string. The btnSearch_Click procedure should prompt the user to enter the sequence of characters for which he or she wants to search. The procedure should
9. Credit card companies typically assign a special digit, called a check digit, to the end of each customer’s credit card number. The check digit allows companies to verify that the credit card number was entered accurately. Many methods for creating the check digit have been developed,
8. Each salesperson at Rembrandt Auto-Mart is assigned an ID number that consists of five characters. The first three characters are numbers. The fourth character is a letter:either the letter N if the salesperson sells new cars or the letter U if the salesperson sells used cars. The fifth
7. Before completing this exercise, you should complete Lesson A’s Discovery Exercise 16.Open the VB2015\Chap08\Jacobson Solution\Jacobson Solution (Jacobson Solution.sln)file. The interface provides a text box for entering a password. The password can contain five, six, or seven characters;
6. Open the VB2015\Chap08\Shipping Solution\Shipping Solution (Shipping Solution.sln)file. The interface provides a text box for entering a shipping code, which should consist of two numbers followed by either one or two letters. The letter(s) represent the delivery method, as follows: MS
5. Open the VB2015\Chap08\Proper Solution\Proper Solution (Proper Solution.sln)file. The interface provides a text box for entering a person’s first and last names. The btnProper_Click procedure should display the first and last names in the proper case.In other words, the first and last names
4. Open the VB2015\Chap08\Reverse Solution\Reverse Solution (Reverse Solution.sln)file. The interface provides a text box for the user to enter one or more words. The btnReverse_Click procedure should display the letters in reverse order. In other words, if the user enters the words “Have a great
3. In this exercise, you modify the Pizza Game application completed in this lesson. Use Windows to make a copy of the Pizza Solution folder. Rename the copy Modified Pizza Solution. Open the Pizza Solution (Pizza Solution.sln) file contained in the Modified Pizza Solution folder. Modify the code
2. Open the VB2015\Chap08\Color Solution\Color Solution (Color Solution.sln) file. The btnDisplay_Click procedure should display the color of the item whose item number is entered by the user. All item numbers contain exactly five characters. All items are available in four colors: blue, green,
1. Open the VB2015\Chap08\Item Solution\Item Solution (Item Solution.sln) file. The btnVerify_Click procedure should determine whether the item number was entered in the required format: two digits, a letter, a hyphen, a letter, a hyphen, and a digit.The procedure should display a message
5. Which of the following returns the Boolean value True when the strPetName variable contains the string “Felix”?a. strPetName.Contains("x")b. strPetName Like "F*"c. strPetName.Substring(1, 2) = "el"d. all of the above
4. The strItem variable contains uppercase letters only. Which of the following determines whether the variable contains either the word “SHIRT” or the word“SKIRT”?a. If strItem Like "S[H-K]IRT" Thenb. If strItem Like "S[HK]IRT" Thenc. If strItem = "S[HK]IRT" Thend. If strItem = "SHIRT"
3. If the strWord variable contains the string “Irene Turner”, what value will the strWord.Contains("e") method return?a. Trueb. Falsec. 2d. 3
2. Which of the following changes the contents of the strName variable from Will to William?a. strName = strName.Append(5, "iam")b. strName = strName.Append(4, "iam")c. strName = strName.Insert(5, "iam")d. strName = strName.Insert(4, "iam")
1. The strItem variable contains 25 characters. Which of the following For clauses will access each character contained in the variable, character by character?a. For intIndex As Integer = 0 To 25b. For intIndex As Integer = 1 To 25c. For intIndex As Integer = 0 To strItem.Length – 1d. For
3. Open the VB2015\Chap08\Bonus Solution\Bonus Solution (Bonus Solution.sln) file.Add a File menu and a Calculate menu to the form. Include an Exit menu item on the File menu. Include two menu items on the Calculate menu: 10% Bonus and 15% Bonus.Assign shortcut keys to the Calculate menu’s items.
2. Open the VB2015\Chap08\Commission Solution\Commission Solution (Commission Solution.sln) file. Add a File menu that contains an Exit menu item. The menu item should end the application. Save the solution and then start the application. Use the Exit menu item to end the application.
1. Use Windows to make a copy of the Net Pay Solution folder from Lesson A. Rename the copy Net Pay Solution-Menu. Open the Net Pay Solution (Net Pay Solution.sln)file contained in the Net Pay Solution-Menu folder. Remove the Exit button and its associated code. Add a File menu that contains an
6. Explain the difference between a menu item’s access key and its shortcut keys.
5. Which property determines whether a control is available to the user during run time?a. Availableb. Enabledc. Unavailabled. Disabled
4. Which of the following is false?a. Menu titles should be one word only.b. Each menu title should have a unique access key.c. You should assign shortcut keys to commonly used menu titles.d. Menu items should be entered using book title capitalization.
3. Which of the following allows the user to access a menu item without opening the menu?a. an access keyb. a menu keyc. shortcut keysd. none of the above
2. The underlined letter in a menu element’s caption is called _____________________ .a. an access keyb. a menu keyc. a shortcut keyd. none of the above
1. The horizontal line in a menu is called _____________________ .a. a menu barb. a separator barc. an item separatord. none of the above
19. Visual Basic provides the Mid statement for replacing a specified number of characters in a string with another string. The statement’s syntax is Mid(targetString, start[, count]) = replacementString. In the syntax, the targetString argument is the string in which you want characters
18. Visual Basic provides the TrimStart and TrimEnd methods for removing one or more characters from the beginning or end, respectively, of a string. The TrimStart method’s syntax is string.TrimStart[(trimChars)], and the TrimEnd method’s syntax is string.TrimEnd[(trimChars)]. The optional
17. In this lesson, you learned how to use the Trim method to remove space characters from both the beginning and end of a string. You can also use the Trim method to remove other characters. The syntax for doing this is string.Trim[(trimChars)]. The optional trimChars argument is a comma-separated
16. Visual Basic provides the Replace method for replacing a sequence of characters in a string with another sequence of characters. The method’s syntax is string.Replace(oldValue, newValue). When processing the Replace method, the computer makes a temporary copy of the string in memory; it then
15. Visual Basic provides the StartsWith and EndsWith methods for determining whether a specific sequence of characters occurs at the beginning or end, respectively, of a string.The StartsWith method’s syntax is string.StartsWith(subString), and the EndsWith method’s syntax is
14. Open the Social Security Solution (Social Security Solution.sln) file contained in the VB2015\Chap08\Social Security Solution-Remove folder. The interface provides a text box for entering a Social Security number. The btnRemove_Click procedure should verify that the Social Security number
13. Open the VB2015\Chap08\Zip Solution\Zip Solution (Zip Solution.sln) file. The btnDisplay_Click procedure should display the correct shipping charge based on the ZIP code entered by the user. To be valid, the ZIP code must contain exactly five digits, and the first three digits must be either
12. Open the VB2015\Chap08\Tax Solution\Tax Solution (Tax Solution.sln) file. The interface provides a text box and a combo box for entering a sales amount and a tax rate, respectively. The btnCalc_Click procedure should remove the percent sign and the space that precedes it from the tax rate
11. Open the VB2015\Chap08\Date Solution\Date Solution (Date Solution.sln) file. The interface provides a text box for entering a date. The btnChange_Click procedure should verify that the date was entered in the correct format, which is two numbers followed by a slash, two numbers, a slash, and
10. Open the VB2015\Chap08\Prices Solution\Prices Solution (Prices Solution.sln) file.Modify the frmMain_Load procedure so that it right-aligns the prices listed in the cboRight control and then selects the first price. Save the solution and then start the application. (The prices listed in the
9. Open the VB2015\Chap08\State Solution\State Solution (State Solution.sln) file. The interface provides an editable combo box for entering the name of a state. Code the btnAdd_Click procedure so that it removes any leading and/or trailing spaces from the state name. If the name contains at least
8. The strAmount variable contains the string “3123560”. Write the Visual Basic statements to change the variable’s contents to “$3,123,560”.
7. Write the Visual Basic statement that uses the Contains method to determine whether the strAddress variable contains the string “Jefferson Street” (entered in uppercase, lowercase, or a combination of uppercase and lowercase). Assign the method’s return value to a Boolean variable named
6. The strAmount variable contains the string “3,123,560”. Write the Visual Basic statements to change the contents of the variable to “3123560”; use the Remove method.
5. Write the Visual Basic statements to accomplish the following tasks:a. In the lblSize control, display the number of characters contained in the strMsg variable.b. Remove the leading and trailing spaces from the strState variable.c. Use the Insert and Remove methods to change the contents of the
4. The strItem variable contains the string “YMBlueX”. Write a Visual Basic statement that assigns the string “Blue” from the strItem variable to the strColor variable.
3. Using the Insert and Remove methods, write the Visual Basic statements to change the contents of the strWord variable from “late” to “crate”.
2. Write a Visual Basic statement that uses the Insert method to change the contents of the strState variable from “Il” to “Illinois”.
1. Write a Visual Basic statement that removes the leading and trailing spaces from the txtAddress control.
15. If the strAddress variable contains the string “2345 Hawthorne Blvd”, what will the strAddress.IndexOf("Hawthorne", 5) method return?a. –1b. 5c. 6d. False
14. If the strLocation variable contains the string “75 Oak Avenue”, what will the strAddress.IndexOf("Oak") method return?a. –1b. 3c. 4d. True
13. The strAmount variable contains the string “245.69”. Which of the following statements changes the contents of the variable to the string “245.69!!”?a. strAmount = strAmount.PadLeft(8, "!"c)b. strAmount = strAmount.PadRight(8, "!"c)c. strAmount = strAmount.PadRight(2, "!"c)d. none of
12. If the strName variable contains the string “Sam Harris”, which of the following changes the contents of the variable to the string “Sam H. Harris”?a. strName = strName.Insert(3, " H.")b. strName = strName.Insert(4, "H.")c. strName = strName.Insert(5, "H. ")d. none of the above
11. If the strMsg variable contains the string “The party is Saturday.”, which of the following assigns the number 13 to the intNum variable?a. intNum = strMsg.Substring(0, "S")b. intNum = strMsg.Contains("S")c. intNum = strMsg.IndexOf("S")d. intNum = strMsg.IndexOf(0, "S")
10. The strName variable contains the string “Jones John”. Which of the following changes the variable’s contents to the string “Jones, John”?a. strName = strName.Insert(5, ",")b. strName = strName.Insert(6, ",")c. strName = strName.Insert(6, 1, ",")d. none of the above
9. Which of the following expressions evaluates to True when the strItem variable contains the string “1234Y5”?a. strItem Like "####[A-Z]#"b. strItem Like "9999[A-Z]9"c. strItem Like "######"d. none of the above
8. If the strWord variable contains the string “chimes”, which of the following statements assigns the letter m to the strLetter variable?a. strLetter = strWord.Substring(3)b. strLetter = strWord.Substring(3, 1)c. strLetter = strWord.Substring(4, 1)d. none of the above
7. If the strPresident variable contains the string “Abraham Lincoln”, what value will the strPresident.IndexOf("Lincoln") method return?a. –1b. 8c. 9d. True
6. Which of the following statements changes the contents of the strWord variable from“sting” to “string”?a. strWord = strWord.AddTo(2, "r")b. strWord = strWord.Insert(2, "r")c. strWord = strWord.Insert(3, "r")d. strWord = strWord.Insert(3, "r"c)
5. Which of the following methods can be used to determine whether the strAmount variable contains the dollar sign?a. blnResult = strAmount.Contains("$")b. intResult = strAmount.IndexOf("$")c. intResult = strAmount.IndexOf("$", 0)d. all of the above
4. Which of the following statements changes the contents of the strZip variable from 60521 to 60561?a. strZip = strZip.Insert(3, "6")strZip = strZip.Remove(4, 1)b. strZip = strZip.Insert(4, "6")strZip = strZip.Remove(3, 1)c. strZip = strZip.Remove(3, 1)strZip = strZip.Insert(3, "6")d. all of the
3. The strName variable contains the string “Carlson”. Which of the following statements changes the contents of the variable to the string “Carl”?a. strName = strName.Remove(0, 4)b. strName = strName.Remove(4, 3)c. strName = strName.Remove(5, 3)d. strName = strName.Remove(5)
2. Which of the following statements assigns the first four characters in the strItem variable to the strWarehouse variable?a. strWarehouse = strItem.Assign(0, 4)b. strWarehouse = strItem.Assign(1, 4)c. strWarehouse = strItem.Substring(0, 4)d. strWarehouse = strItem.Substring(1, 4)
1. The txtState control contains the word Alaska followed by one space. Which of the following statements removes the space from the control’s contents?a. txtState.Text = txtState.Text.Trimb. txtState.Text = Trim(txtState.Text)c. txtState.Text = txtState.Trimd. txtState.Text.Trim
12. The purpose of this exercise is to demonstrate a common error made when using functions. Open the Debug Solution (Debug Solution.sln) file contained in the VB2015\Chap07\Debug Solution-Lesson C folder. Start the application. Click 20 in the Length list box, and then click 30 in the Width list
11. Create an application, using the following names for the solution and project, respectively: Cable Direct Solution and Cable Direct Project. Save the application in the VB2015\Chap07 folder. Create the interface shown in Figure 7-56. The list boxes are named lstPremium and lstConnections.
10. In this exercise, you modify the Mats-R-Us application from Exercise 9. Use Windows to make a copy of the Mats Solution folder. Rename the copy Modified Mats Solution. Open the Mats Solution (Mats Solution.sln) file contained in the Modified Mats Solution folder.Change the function to an
9. Create an application, using the following names for the solution and project, respectively: Mats Solution and Mats Project. Save the application in the VB2015\Chap07 folder. Mats-R-Us sells three different type of mats: Standard ($99), Deluxe($129), and Premium ($179). All of the mats are
8. In this exercise, you modify the Donut Shoppe application from Exercise 7. Use Windows to make a copy of the Donut Solution folder. Rename the copy Modified Donut Solution. Open the Donut Solution (Donut Solution.sln) file contained in the Modified Donut Solution folder. Change the three
7. The Donut Shoppe sells four varieties of doughnuts: Glazed ($.75), Sugar ($.75), Chocolate ($.75), and Filled ($.95). It also sells regular coffee ($1.50) and cappuccino($2.75). The store manager wants you to create an application that displays a customer’s subtotal, 4.5% sales tax, and total
6. Open the Translator Solution (Translator Solution.sln) file contained in the VB2015\Chap07\Translator Solution-Function folder. The application should use three functions to translate the English words into French, German, or Spanish.Code the application. (Hint: Depending on the way you code
5. Open the Translator Solution (Translator Solution.sln) file contained in the VB2015\Chap07\Translator Solution-Sub folder. The application should use three independent Sub procedures to translate the English words into French, German, or Spanish. Code the application. (Hint: Depending on the way
4. In this exercise, you modify the Cerruti Company application from this lesson. Use Windows to make a copy of the Cerruti Solution folder. Rename the copy Modified Cerruti Solution. Open the Cerruti Solution (Cerruti Solution.sln) file contained in the Modified Cerruti Solution folder. Modify the
3. In this exercise, you modify the Cerruti Company application from this lesson. Use Windows to make a copy of the Cerruti Solution folder. Rename the copy Cerruti Solution-Sub. Open the Cerruti Solution (Cerruti Solution.sln) file contained in the Cerruti Solution-Sub folder. Change the GetFwt
2. In this exercise, you modify the Monthly Payment application from Lesson B. Use Windows to make a copy of the Payment Solution folder. Rename the copy Payment Solution-FormClosing. Open the Payment Solution (Payment Solution.sln) file contained in the Payment Solution-FormClosing folder. The
1. In this exercise, you will remove the Math.Round function from the payroll application created in the lesson; doing this will allow you to observe the “penny off” error. Use Windows to make a copy of the Cerruti Solution folder. Rename the copy No Rounding Cerruti Solution. Open the Cerruti
4. Which of the following statements prevents a form from being closed?a. e.Cancel = Falseb. e.Cancel = Truec. e.Close = Falsed. sender.Close = False
3. Which event is triggered when the computer processes the Me.Close() statement entered in the btnExit_Click procedure?a. the form’s Closing eventb. the form’s FormClosing eventc. the btnExit control’s Closing eventd. the btnExit control’s FormClosing event
2. Which of the following rounds the contents of the dblNum variable to two decimal places?a. Math.Round(dblNum, 2)b. Math.Round(2, dblNum)c. Round.Math(dblNum, 2)d. Round.Math(2, dblNum)
1. Which of a form’s events is triggered when you click the Close button on its title bar?a. Closeb. CloseFormc. FormClosed. FormClosing
7. In this exercise, you modify one of the Concert Tickets applications from Lesson A.Use Windows to make a copy of the Concert Solution-Function folder. Rename the copy Concert Solution-Intermediate. Open the Concert Solution (Concert Solution.sln)file contained in the Concert
6. In this exercise, you modify the application from Exercise 4. Use Windows to make a copy of the Planets Solution folder. Rename the copy Planets Solution-Function.Open the Planets Solution (Planets Solution.sln) file contained in the Planets Solution-Function folder. Modify the code to use a
5. In this exercise, you modify the application from Exercise 4. Use Windows to make a copy of the Planets Solution folder. Rename the copy Planets Solution-Sub. Open the Planets Solution (Planets Solution.sln) file contained in the Planets Solution-Sub folder. Modify the code to use an independent
4. Create an application, using the following names for the solution and project, respectively: Planets Solution and Planets Project. Save the application in the VB2015\Chap07 folder. Create the interface shown in Figure 7-38. The combo box should have the DropDownList style and contain the
3. In this exercise, you modify the Favorites application from Lesson A. Use Windows to make a copy of the Favorites Solution folder. Rename the copy Favorites Solution-Intermediate. Open the Favorites Solution (Favorites Solution.sln) file contained in the Favorites Solution-Intermediate folder.
2. In this exercise, you create an application that displays the capital of the state whose name is selected in a combo box. Create an application, using the following names for the solution and project, respectively: Capital Solution and Capital Project. Save the application in the VB2015\Chap07
1. In this exercise, you create an application that displays the name of the artist corresponding to the song title selected in a combo box. Create the application, using the following names for the solution and project, respectively: Song Solution and Song Project. Save the application in the
5. Which event occurs when the user either types a value in the text portion of a combo box or selects a different item in the list portion?a. ChangedItemb. ChangedValuec. SelectedItemChangedd. TextChanged
4. The item that appears in the text portion of a combo box is stored in which property?a. SelectedTextb. SelectedValuec. Textd. TextItem
3. Which of the following selects the Cat item, which appears third in the cboAnimal control?a. cboAnimal.SelectedIndex = 2b. cboAnimal.SelectedItem = "Cat"c. cboAnimal.Text = "Cat"d. all of the above
2. The items in a combo box belong to which collection?a. Itemsb. Listc. ListBoxd. Values
1. Which property is used to specify a combo box’s style?a. ComboBoxStyleb. DropDownStylec. DropStyled. Style
18. Open the Debug Solution (Debug Solution.sln) file contained in the VB2015\Chap07\Debug Solution-Lesson A folder. Open the Code Editor window and review the existing code. Start the application. Enter 100, 200.55, and .04 in the Store 1 sales, Store 2 sales, and Commission rate boxes,
17. In this exercise, you learn how to specify that one or more arguments are optional in a Call statement. Open the VB2015\Chap07\Optional Solution\Optional Solution(Optional Solution.sln) file.a. Open the Code Editor window and review the existing code. The btnCalc_Click procedure contains two
16. Open the Conversion Solution (Conversion Solution.sln) file contained in the VB2015\Chap07\Conversion Solution-Function folder. Code the application so that it uses two functions: one to convert a measurement from inches to centimeters, and one to convert a measurement from centimeters to
15. Open the Conversion Solution (Conversion Solution.sln) file contained in the VB2015\Chap07\Conversion Solution-Sub folder. Code the application so that it uses two independent Sub procedures: one to convert a measurement from inches to centimeters, and one to convert a measurement from
14. In this exercise, you modify the Savings Account application from Exercise 13. Use Windows to make a copy of the Savings Solution-Function folder. Rename the copy Savings Solution-Sub. Also change the solution file’s name to Savings Solution.sln. Open the Savings Solution (Savings
13. Create an application, using the following names for the solution and project, respectively:Savings Solution-Function and Savings Project. The application’s interface is shown in Figure 7-31. The interface provides a text box for the user to enter a one-time deposit into a savings account. If
12. Open the VB2015\Chap07\Average Solution\Average Solution (Average Solution.sln) file.Open the Code Editor window and review the existing code. The btnAvg_Click procedure should use a function to calculate and return the average score. Complete the application’s code, and then test it
11. Create an application, using the following names for the solution and project, respectively: Gross Solution-Function and Gross Project. The application’s interface is shown in Figure 7-30. The lstHours control should display the number of hours worked from 1 to 60 in increments of 1. The
10. Create an application, using the following names for the solution and project, respectively: Gross Solution-Sub and Gross Project. The application’s interface is shown in Figure 7-30. The lstHours control should display the number of hours worked from 1 to 60 in increments of 1. The lstRates
9. In this exercise, you modify one of the Concert Tickets applications from this lesson.Use Windows to make a copy of the Concert Solution-Function folder. Rename the copy Modified Concert Solution-Function. Open the Concert Solution (Concert Solution.sln) file contained in the Modified Concert
Showing 300 - 400
of 1847
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
Last
Step by Step Answers