Bartleby Sitemap - Textbook Solutions

All Textbook Solutions for Programming with Microsoft Visual Basic 2017

What is a computer program?What is a GUI? What is the process of translating a solution into a computer program called? In object-oriented programming, what is a class?Which window in the IDE lists the tools you can use to add objects to a form? While designing an interface, which window in the IDE allows you to change the default value of an object’s property? 3MQ21MQ32MQ3What filename extension indicates that the file is a Visual Basic source file?1MQ42MQ43MQ44MQ41MQ5What is the three-character ID used when naming buttons? What is the purpose of an access key? What character is used to designate an access key? 1MQ62MQ63MQ64MQ61MQ72MQ73MQ74MQ7In the Code Editor window, what character designates that the text that follows it is a comment? A(n)._____ is an environment that contains all of the tools and features you need to create, run, and test your programs. GUI IDE UDE user interface When using an analogy involving a blueprint and a tree house, the ____________ is the class, and the ____________ is an object created from it. a. blueprint, tree house b. tree house, blueprintYou create your application’s user interface in the _____ window in the IDE. designer form GUI interface Each tool in the toolbox represents a class from which an object can be instantiated. True False Which window is used to set the characteristics that control an object’s appearance and behavior? Characteristics Object Properties Toolbox 6RQ7RQ8RQWhich property is used to give a form file a more meaningful name? File File Name Form Name Name Which property determines the initial position of a form when the application is started? a. InitialLocation b. Location c. StartLocation d. StartPosition11RQ12RQ13RQ14RQ15RQWhat is the three-character extension appended to solution filenames in Visual Basic? .prg .sin .src .vbs 17RQ18RQWhich statement terminates an application that contains only one form? Me.Close() Me.Done() Me.Finish() Me.Stop() 20RQ21RQ22RQ23RQ24RQ25RQ1E2E3E4E5E6E7E8E9E10E1MQ12MQ13MQ14MQ11MQ22MQ23MQ24MQ21MQ32MQ33MQ34MQ31RQ2RQ3RQ4RQ5RQ6RQ7RQ8RQ9RQ10RQ11RQ12RQ13RQ14RQ15RQ16RQ17RQ18RQDefine sentence capitalization. 20RQ1E2ECreate an application that calculates and displays the amount of a homeowners property tax. The tax is 1.35% of the propertys assessed value, which will be entered by the user. a. Prepare a Planning Chart for the application. b. Draw a sketch of an appropriate interface. Be sure to follow the GUI design guidelines covered in the chapter. The guidelines are summarized in Figure 2-20. (If you want to include an image in the interface, you can either use your own image file or download an image file from openclipart.org. When downloading from openclipart.org, be sure to use the SMALL IMAGE (.PNG) button.) c. Create a Windows Forms application. Use the following names for the project and solution, respectively: Tax Project and Tax Solution. Save the application in the VB2017\Chap02 folder. Change the appropriate properties of the form. Also, be sure to verify the name of the startup form. d. Use your Planning Chart as a guide when building the interface. e. Code the Exit button. (You do not need to code the button that calculates and displays the tax.) Save the solution and then start the application. Test the access keys, tab order, and Exit button and then close the solution.4ECreate an application that calculates and displays two raise amounts, which are based on an employee’s current salary. The current salary will be entered by the user. The two raise rates are 5% and 8%. In addition to the raise amounts, the application should also calculate and display the employee’s new salaries. Include a button in the interface that the user can click to clear the user input and calculated results from the screen. Prepare a Planning Chart for the application. Draw a sketch of an appropriate interface. Be sure to follow the GUI design guidelines covered in the chapter. The guidelines are summarized in Figure 2-20. (If you want to include an image in the interface, you can either use your own image file or download an image file from openclipart.org. When downloading from openclipart.org, be sure to use the SMALL IMAGE (.PNG) button.) Create a Windows Forms application. Use the following names for the project and solution, respectively: Salary Project and Salary Solution. Save the application in the VB2017\Chap02 folder. Use your Planning Chart as a guide when building the interface. Code the Exit button. (You do not need to code the button that calculates and displays the raises and new salaries or the button that clears the user input and calculated results.) Save the solution and then start the application. Test the access keys, tab order, and Exit button and then close the solution. 6E7E8E9E10E1MQ12MQ13MQ14MQ15MQ1Which of the following are valid names for variables: intAge, dblFirst&Qtr, decRate5, strFirst_Name, and dbl$Sales? 1MQ22MQ2Write a Dim statement that declares a Boolean variable named blnIsRegistered and initializes it using the keyword True. 1MQ32MQ33MQ3Write a TryParse method that stores the strSales variable’s value in the dblSales variable. 1MQ42MQ43MQ44MQ45MQ41MQ52MQ53MQ54MQ51MQ62MQ63MQ64MQ65MQ61MQ72MQ73MQ74MQ71MQ82MQ83MQ84MQ81MQ92MQ93MQ91RQ2RQWhat is the result of the following expression: 96 Mod 30? 3 3.2 6 None of the above. Which of the following is an invalid name for a variable? a. db18%Rate b. decCost c. strName d. None of the above.The expression intNum * intNum * intNum is equivalent to which of the following expressions? intNum ^ 3 intNum * 3 intNum ^ 2 * intNum Both a and c. What is the result of the following expression: 3 * 5 \ 2 + 30 / 5? 7.5 13 13.5 None of the above. 7RQWhich of the following statements declares a procedure-level variable that remains in the computer’s memory until the application ends? Dim Static intScore As Integer Private Static intScore As Integer Static intScore As Integer Both b and c. Which of the following can be used to clear the text contained in the lblTax control? lblTax = String.Empty lblTax.Text = String.Empty lblTax.ClearText lblTax.Text.Clear 10RQWhich of the following declares a procedure-level String variable? a. Dim String strCity b. Dim strCity As String c. Private strCity As String d. Both b and c.12RQ13RQ14RQ15RQ16RQA static variable has the same _____________________ as a procedure-level variable but the same _____________________ as a class-level variable. lifetime, scope scope, lifetime 18RQWhich of the following statements declares a procedure-level variable that is removed from the computers memory when the procedure ends? a. Const intCounter As Integer b. Dim intCounter As Integer c. Local intCounter As Integer d. Static intCounter As IntegerMost of the memory locations declared in an application should be class-level variables. a. True b. False1E2E3E4E5E6E7E8E9E10E11E12E13E14E15E16E1MQ12MQ13MQ11MQ22MQ23MQ24MQ2What is the opposite of greater than?1MQ32MQ33MQ34MQ31MQ42MQ43MQ41MQ52MQ53MQ51MQ6Jake’s Car Rental charges each customer a daily rental fee of $55. However, there is an additional charge for renting a luxury car. The additional charge is $10 if the customer has a Jake’s Luxury coupon; otherwise, the additional charge is $30. What are the primary and secondary decisions? 1MQ72MQ7Write a Case clause that specifies all numbers less than 0.1MQ82MQ83MQ8A form contains six radio buttons. Three of the radio buttons are contained in a group box. How many of the radio buttons in the interface can be selected at the same time?Which property of the KeyPress procedures e parameter is used to determine the key pressed by the user?Which property of the KeyPress procedure’s e parameter is used to determine the key pressed by the user? 3MQ94MQ95MQ91RQ2RQ3RQ4RQ5RQ6RQ7RQ8RQ9RQ10RQ11RQ12RQUse the code shown in Figure 4-54 to answer Review Questions 13 through 16. If strLevel = 1 OrElse strLevel = 2 Then lblStatus.Text = Bronze ElseIf strLevel = 3 OrElse strLevel = 4 Then lblStatus.Text = Silver ElseIf strLevel = 5 Then lblStatus.Text = Gold Else lblStatus.Text = Platinum End If Figure 4-54 Code for Review Questions 13 through 16 What will the code in Figure 4-54 assign to the lblStatus control when the strLevel variable contains the string 2? a. Bronze b. Gold c. Platinum d. SilverUse the code shown in Figure 4-54 to answer Review Questions 13 through 16. If strLevel = “1” OrElse strLevel = “2” Then lblStatus.Text = “Bronze” ElseIf strLevel = “3” OrElse strLevel = “4” Then lblStatus.Text = “Silver” ElseIf strLevel = “5” Then lblStatus.Text = “Gold” Else lblStatus.Text = “Platinum” End If Figure 4-54 Code for Review Questions 13 through 16 What will the code in Figure 4-54 assign to the lblStatus control when the strLevel variable contains the string “5”? Bronze Gold Platinum Silver Use the code shown in Figure 4-54 to answer Review Questions 13 through 16. If strLevel = “1” OrElse strLevel = “2” Then lblStatus.Text = “Bronze” ElseIf strLevel = “3” OrElse strLevel = “4” Then lblStatus.Text = “Silver” ElseIf strLevel = “5” Then lblStatus.Text = “Gold” Else lblStatus.Text = “Platinum” End If Figure 4-54 Code for Review Questions 13 through 16 What will the code in Figure 4-54 assign to the lblStatus control when the strLevel variable contains the string “10”? Bronze Gold Platinum Silver 16RQ17RQ18RQ19RQ20RQ21RQ22RQ23RQ24RQ25RQIt is customary in Windows applications to designate a default check box. a. True b. False27RQ28RQ29RQ30RQ31RQ32RQ33RQ34RQWhich of the following statements is equivalent to the statement dblTotal = dblRate dblTotal? a. dblTotal = dblRate b. dblTotal = dblRate c. dblRate = dblTotal d. dblRate = dblTotalThe six logical operators are listed below. Indicate their order of precedence by placing a number (1, 2, and so on) on the line to the left of the operator. If two or more operators have the same precedence, assign the same number to each. __________ Xor __________ And __________ Not __________ Or __________ AndAlso __________ OrElseAn expression can contain arithmetic, comparison, and logical operators. Indicate the order of precedence for the three types of operators by placing a number (1, 2, or 3) on the line to the left of the operator type. __________ Arithmetic __________ Logical __________ Comparison1E2E3E4E5E6E7E8E9E10E11E12E13E14E15E16EThe purpose of this exercise is to demonstrate the importance of testing an application thoroughly. Open the FixIt Solution.sln file contained in the VB2017\Chap04\FixIt Solution folder. The application displays a shipping charge that is based on the total price entered by the user, as shown in Figure 4-64. Start the application and then test it by clicking the Display shipping button. Notice that the Shipping charge box contains $13, which is not correct. Now, test the application using the following total prices: 100, 501, 1500, 500.75, 30, 1000.33, and 2000. Here too, notice that the application does not always display the correct shipping charge. (More specifically, the shipping charge for two of the seven total prices is incorrect.) Open the Code Editor window and correct the errors in the code. Save the solution and then start and test the application. 1MQ12MQ13MQ14MQ11MQ2Rewrite the Loop clause from Question 1 using the Until keyword. 3MQ24MQ21MQ32MQ33MQ34MQ3Write a For clause that repeats the loop body instructions 10 times. Use intX as the counter variable’s name, and declare the variable in the For clause. 2MQ43MQ41MQ52MQ53MQ54MQ5Write an Add method that adds the contents of the decPrice variable to the lstPrices control.2MQ63MQ61MQ72MQ73MQ71MQ82MQ83MQ84MQ8Which of the following clauses will stop the loop when the value in the intPopulation variable is less than the number 5000? Do While intPopulation >= 5000 Do Until intPopulation < 5000 Loop While intPopulation >= 5000 All of the above. Which of the following statements can be used to code a loop whose instructions you want processed 10 times? a. DoLoop b. ForNext c. All of the above.3RQ4RQ5RQ6RQ7RQ
Page: [1][2][3]