Programming with Microsoft Visual Basic 2017
8th Edition
ISBN: 9781337102124
Author: Diane Zak
Publisher: Cengage Learning
expand_more
expand_more
format_list_bulleted
Concept explainers
Expert Solution & Answer
Chapter 4, Problem 12RQ
Program Description Answer
The given code will assign the value “10” to the variable intCost when the intAge variable contains the number 33.
Hence, correct answer is option “D”.
Expert Solution & Answer
Want to see the full answer?
Check out a sample textbook solutionStudents have asked these similar questions
An employee’s current pay rate appears in the txtCurrentRate control. Write an assignment statement that increases the current pay rate by 10 and then assigns the result to the lblNewRate control.
What does the total mean in the assignment:
Specifications: Lions, Tigers and Bears Pet Clinic needs an application that displays basic services. The application should be designed with check boxes to select the various services (such as office call, vaccination, grooming, etc). As each service is selected, the charge for the service should display in an associated label. (When the check mark is removed, the amount should be removed).
As each selection is made, the charges should be added into the total (a variable… consider scope), and displayed in a Total Due area on the application (currency format). Align all numeric data appropriately.
Consider what should happen when the check mark is removed.
Include at least 8 services that your pet clinic performs.
Include a Clear and Exit button.
The clear should clear all check boxes, appropriate labels, and the total variable.
Use the standard Microsoft naming conventions for all controls.
Include appropriate comments in your code.
IN EXCEL VBA FORMAT PLEASE
Write a sub that uses the If Construct. If the value in cell B1 is greater than 75, cell B1 should be colored green. If not, it should be colored red.
Chapter 4 Solutions
Programming with Microsoft Visual Basic 2017
Ch. 4 - Prob. 1MQ1Ch. 4 - Prob. 2MQ1Ch. 4 - Prob. 3MQ1Ch. 4 - Prob. 1MQ2Ch. 4 - Prob. 2MQ2Ch. 4 - Prob. 3MQ2Ch. 4 - Prob. 4MQ2Ch. 4 - What is the opposite of greater than?Ch. 4 - Prob. 1MQ3Ch. 4 - Prob. 2MQ3
Ch. 4 - Prob. 3MQ3Ch. 4 - Prob. 4MQ3Ch. 4 - Prob. 1MQ4Ch. 4 - Prob. 2MQ4Ch. 4 - Prob. 3MQ4Ch. 4 - Prob. 1MQ5Ch. 4 - Prob. 2MQ5Ch. 4 - Prob. 3MQ5Ch. 4 - Prob. 1MQ6Ch. 4 - Jake’s Car Rental charges each customer a daily...Ch. 4 - Prob. 1MQ7Ch. 4 - Prob. 2MQ7Ch. 4 - Write a Case clause that specifies all numbers...Ch. 4 - Prob. 1MQ8Ch. 4 - Prob. 2MQ8Ch. 4 - Prob. 3MQ8Ch. 4 - A form contains six radio buttons. Three of the...Ch. 4 - Which property of the KeyPress procedures e...Ch. 4 - Which property of the KeyPress procedure’s e...Ch. 4 - Prob. 3MQ9Ch. 4 - Prob. 4MQ9Ch. 4 - Prob. 5MQ9Ch. 4 - Prob. 1RQCh. 4 - Prob. 2RQCh. 4 - Prob. 3RQCh. 4 - Prob. 4RQCh. 4 - Prob. 5RQCh. 4 - Prob. 6RQCh. 4 - Prob. 7RQCh. 4 - Prob. 8RQCh. 4 - Prob. 9RQCh. 4 - Prob. 10RQCh. 4 - Prob. 11RQCh. 4 - Prob. 12RQCh. 4 - Use the code shown in Figure 4-54 to answer Review...Ch. 4 - Use the code shown in Figure 4-54 to answer Review...Ch. 4 - Use the code shown in Figure 4-54 to answer Review...Ch. 4 - Prob. 16RQCh. 4 - Prob. 17RQCh. 4 - Prob. 18RQCh. 4 - Prob. 19RQCh. 4 - Prob. 20RQCh. 4 - Prob. 21RQCh. 4 - Prob. 22RQCh. 4 - Prob. 23RQCh. 4 - Prob. 24RQCh. 4 - Prob. 25RQCh. 4 - It is customary in Windows applications to...Ch. 4 - Prob. 27RQCh. 4 - Prob. 28RQCh. 4 - Prob. 29RQCh. 4 - Prob. 30RQCh. 4 - Prob. 31RQCh. 4 - Prob. 32RQCh. 4 - Prob. 33RQCh. 4 - Prob. 34RQCh. 4 - Which of the following statements is equivalent to...Ch. 4 - The six logical operators are listed below....Ch. 4 - An expression can contain arithmetic, comparison,...Ch. 4 - Prob. 1ECh. 4 - Prob. 2ECh. 4 - Prob. 3ECh. 4 - Prob. 7ECh. 4 - Prob. 11ECh. 4 - The purpose of this exercise is to demonstrate the...
Knowledge Booster
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.Similar questions
- 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 2? a. Bronze b. Gold c. Platinum d. Silverarrow_forwardUse 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 Silverarrow_forwardAn IF function will be entered into an Excel worksheet to evaluate the contents of two cell locations: A7 and C7. Cell A7 contains the percent change from the cost of an investment to its current value. Cell C7 shows the current profit in dollars for an investment. If either cell A7 is greater than 5% or cell C7 is greater than 500, the IF function should multiply the value in cell A1 by the value in cell B1. Otherwise, the function should produce a blank cell. In the space below, enter an IF function using the OR function to produce the outputs described above. Enter this function as if it is being entered into a cell on an Excel worksheet.arrow_forward
- Write an assignment statement that increments the intTotal variable by the contents of the intQuantity variable.arrow_forwardA user enters details into the form as shown in Figure 4. DONATION FORM Student Name: John Lee Student ID: 21WAD12345 Student Email: johnlee@gmail.com Gender: O Male O Female Donation (RM): 100 Submit Reset Figure 4 Write results() function to display the inputs entered as shown in Figure 5 when Submit button is clicked. Thank You! Here is your details: Student Name : John Lee Student ID : 21WAD12345 Student Email : johnlee@gmail.com Gender : Male Donation (RM) : 100 Figure 5 When Reset button is clicked, clear all the input fields.arrow_forwardWrite an assignment statement that decrements the intNum counter variable by 5. Use an arithmetic assignment operator.arrow_forward
- A concert hall has three seating categories: Orchestra, Main floor, and Balcony.Orchestra seats are $25, Main floor seats are $30, and Balcony seats are $15. The manager wants an application that allows him to enter the number of tickets sold in each seating category. The application should calculate the amount of revenue generated by each category, and then display each result using the “N0” format. The application should also calculate the total revenue, displaying the result using the “C0” format.a. List the output, processing (if any), and input items, and then create an appropriate algorithm. b. Create a Visual Basic Windows application. Use the following names for the solution and project, respectively: Concert Solution and Concert Project. Save the application in the ClearlyVB2012\Chap06 folder. Change the name of the form file on your disk to frmMain.vb. If necessary, change the form’s name to frmMain. c. Create a suitable interface. Include an Exit button. d. Code the Exit…arrow_forwardManager = new Employee is a statement that instantiates an Employee object and assigns it to the manager variable. True or Falsearrow_forwardWrite an assignment statement that increments the intNumEmployees variable by 1.arrow_forward
- DORM AND MEAL PLAN CALCULATOR A university has the following dormitories: Allen Hall $1,500 per semesterPike Hall $1,600 per semesterFarthing Hall $1,800 per semesterUniversity Suites $2,500 per semesterThe university also offers the following meal plans:7 meals per week $ 600 per semester14 meals per week $1,200 per semesterUnlimited meals $1,700 per semesterCreate an application with two forms. The main form should allow the user to select a dormitory and a meal plan. The application should show the total charges on the second form. For this assignment, you will create two forms (each form is an object). On the first form you will have two list boxes. One will display the Dormitories and the other one will display the Meal Plans. The user will select one Dorm and one meal plan. The user will then click a button the will open up a second form and show the results. I would suggest that you store the Dormitories is a two dimensional array for name and cost. I would suggest that you…arrow_forwardTrue or False 5. The name gross_pay is written in the camelCase convention.arrow_forwardWhat will the code in Figure 4-53 assign to the intCost variable when the intAgevariable contains the number 33?a. 0b. 5c. 8d. 10arrow_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 LearningProgramming Logic & Design ComprehensiveComputer ScienceISBN:9781337669405Author:FARRELLPublisher:CengageNp Ms Office 365/Excel 2016 I NtermedComputer ScienceISBN:9781337508841Author:CareyPublisher:Cengage
Programming with Microsoft Visual Basic 2017
Computer Science
ISBN:9781337102124
Author:Diane Zak
Publisher:Cengage Learning
Programming Logic & Design Comprehensive
Computer Science
ISBN:9781337669405
Author:FARRELL
Publisher:Cengage
Np Ms Office 365/Excel 2016 I Ntermed
Computer Science
ISBN:9781337508841
Author:Carey
Publisher:Cengage