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
Chapter 7, Problem 14RQ
Program Description Answer
The statement strName = strName.Remove(4) removes the 5th character of the contents of the strName variable and changes it from “Jeffers” to “Jeff”.
Hence, the correct answer is option “A”.
Expert Solution & Answer
Want to see the full answer?
Check out a sample textbook solutionStudents have asked these similar questions
The strName variable contains the string “Doe Jane”. Which of the following changes the variable’s contents to the string “Doe, Jane”? a. strName = strName.Insert(3, ",") b. strName = strName.Insert(4, ",") c. strName = strName.AddTo(3, ",") d. None of the above.
The strName variable contains the string “Jeffers”. Which of the following statements changes the contents of the variable to the string “Jeff”? a. strName = strName.Remove(4) b. strName = strName.Remove(5) c. strName = strName.Remove(5, 3) d. strName = strName.Remove(3, 5)
Which JavaScript statement should you use to determine whether the string stored in the variable funnyStory includes the word “cat”?
a.
let includesCat = funnyStory.includes(" cat ");
b.
let includesCat = funnyStory.includes("cat");
c.
let includesCat = funnyStory.indexOf(cat);
d.
let includesCat = funnyStory.substring(" cat ");
Chapter 7 Solutions
Programming with Microsoft Visual Basic 2017
Ch. 7 - Which of the following statements changes the...Ch. 7 - Prob. 3RQCh. 7 - Prob. 6RQCh. 7 - Prob. 7RQCh. 7 - Prob. 11RQCh. 7 - Prob. 12RQCh. 7 - Prob. 14RQCh. 7 - Which of the following expressions evaluates to...Ch. 7 - Which of the following statements declares an...Ch. 7 - Which of the following statements generates a...
Knowledge Booster
Similar questions
- If the following JavaScript commands were used to construct and place the niftyDivelement, then removing this element may be accomplished by using the statement document.deleteChild(niftyDiv);.let niftyDiv = document.createElement("div"); document.body.appendChild(niftyDiv); Choose between True or False: True Falsearrow_forwardconst addButtonListeners = function () { const buttons = document .querySelectorAll("main")[0] .querySelectorAll(`button`); buttons.forEach((button) => { const postId = button.dataset.postId; button.addEventListener("click", function () { toggleComments(postId); }); }); return buttons;}; This is the current JavaScript I have. I need the function addButtonListeners should add a click listener that calls the toggleComments function to each button element found within the main element. I keep getting the error below. AssertionError: expected undefined to equal truearrow_forwardThe strCity and strState variables contain the strings “Darien” and “IL”, respectively. Which of the following assigns the string “Darien, IL” (the city, a comma, a space, and the state) to the lblAddress control’s Text property?a. lblAddress.Text = "strCity" & ", " & "strState"b. lblAddress.Text = strCity $ ", " $ strStatec. lblAddress.Text = strCity & ", " & strStated. lblAddress.Text = "strCity, " & "strState"arrow_forward
- Extra 6-1 Develop the Temperature Converter In this exercise, you’ll use radio buttons to determine whether the conversion is from Fahrenheit to Celsius or vice versa. You’ll also modify the DOM so the labels change when a radio button is clicked, and the page displays an error message when the user enters invalid data. 1. Open the application in this folder: exercises_extrach06convert_temps 2. Note that the JavaScript file has some starting JavaScript code, including the $() function, three helper functions, three event handler functions, and a DOMContentLoaded event handler that attaches the three event handlers. 3. Review how the toCelsius() and toFarhenheit() event handler functions call the toggleDisplay() helper function and pass it strings to display. Also note that the toggleDisplay() helper function and the convertTemp() event handler function are incomplete. 4. Code the toggleDisplay() function so it changes the text in the labels for the text boxes to the values in the…arrow_forwardForm Validation for jscript. This is the requirement. I just need the code and attached to my jscode. Payment Information Validation Validate the customer’s payment information as follows: Expiry Date (Month) Required field Expiry Date Valid expiry date to ensure the card being used has not expired Card Number Required field, Valid Card Number NOTE: regarding the expiry date, you MUST use the date object to ensure that your date check is dynamic. here is the given html code. <li> <label for="month">Expiry Date</label> <select id="month" name="month"> <option>- Month -</option> <option value="1">January</option> <option value="2">February</option> <option…arrow_forwardPlease create using C# The sales tax rate is 5.5%. Rename all text boxes, using a 2 after their names as in:txtNumScoops2, txtUnitPrice2, btnCalculate2, etc.10. Delete the Discount Code label and the Discount Code text box11. Add a group box from your toolbox, change the text property to be Discount Code12. Click on the group box, and then click the radio button object in the toolbox13. Change the text property for the radio button to Discount 20%, rename (ID property)to radDiscount2014. Copy the radio button two more times15. Rename them to be radDiscount10 and radDiscount0 and change the text properties tobe Discount 10%, Discount 0%/16. Do the same calculations as the top objects, however modify your code to use theradio button to determine which discount option to implementa. The code to check if a radio button has been selected would be:if (radDiscount20.Checked) //this implies the first button has been selected17. To clear a radio button the code would be:radDiscount20.Checked =…arrow_forward
- Which of the following statements removes any leading and trailing spaces from the strCity variable? a. strCity = Trim(strCity) b. strCity = strCity.Trimc. strCity = strCity.Text.Trim d. none of the abovearrow_forwardIf the strMessage variable contains the string “Today is Sunday”, which of the following assigns the number 10 to the intNum variable?a. intNum = strMessage.Substring("u")b. intNum = strMessage.Substring("S", 1)c. intNum = strMessage.IndexOf("u")d. intNum = strMessage.IndexOf(0, "S")arrow_forwardWhich of the following assigns the highest column subscript in the array to the intHighCol variable?a. intHighCol = decSales.GetHighest(1)b. intHighCol = decSales.GetHighSub(1)c. intHighCol = decSales.GetUpperBound(1)d. intHighCol = decSales.GetUpperBound(0)arrow_forward
- Suppose you are working on a web form that contains the following hidden field: <input type="hidden" id="sauceName" name="sauceName" /> Which JavaScript statement should you add to the following code to store the name of the sauce flavor selected by the user as data in this hidden field? let orderForm = document.forms.orderForm; let sauceFlavor = orderForm.elements.sauceFlavor; let sauceIndex = sauceFlavor.selectedIndex; a. orderForm.elements.sauceName.value = orderForm.elements.sauceFlavor.options[sauceIndex].text; b. orderForm.elements.sauceFlavor.value = orderForm.elements.sauceName.options[sauceIndex].text; c. orderForm.elements.sauceName = orderForm.elements.sauceFlavor.options[sauceIndex]; d. orderForm.elements.sauceName.id = orderForm.elements.sauceFlavor.options.text;arrow_forwardWhich of the following properties determines whether a text box contains a scroll bar?a. Scrollableb. ScrollBars c. Scrollerd. none of the abovearrow_forwardWhich of the following data types is appropriate for a variable that will storealphanumeric text? a. Alpha b. AlphaNum c. String d. Textarrow_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 LearningNew Perspectives on HTML5, CSS3, and JavaScriptComputer ScienceISBN:9781305503922Author:Patrick M. CareyPublisher:Cengage LearningMicrosoft Visual C#Computer ScienceISBN:9781337102100Author:Joyce, Farrell.Publisher:Cengage Learning,
Programming with Microsoft Visual Basic 2017
Computer Science
ISBN:9781337102124
Author:Diane Zak
Publisher:Cengage Learning
New Perspectives on HTML5, CSS3, and JavaScript
Computer Science
ISBN:9781305503922
Author:Patrick M. Carey
Publisher:Cengage Learning
Microsoft Visual C#
Computer Science
ISBN:9781337102100
Author:Joyce, Farrell.
Publisher:Cengage Learning,