Explanation of Solution
Given: The following lines of code:
Const ESTATE_TAX_EXEMPTION As Double = 1000000
Const TAX_RATE As Decimal = 0.45D
Dim valueOfEstate As Decimal = 3000000
Dim tax As Double = TAX_RATE * (valueOfEstate - ESTATE_TAX_EXEMPTION)
txtOutput.Text = "You owe " & tax.ToString(“C�) & " in estate taxes."
To find: The output produced by the given lines of code.
Const ESTATE_TAX_EXEMPTION As Double = 1000000
Const TAX_RATE As Decimal = 0.45D
Dim valueOfEstate As Decimal = 3000000
Dim tax As Double = TAX_RATE * (valueOfEstate - ESTATE_TAX_EXEMPTION)
txtOutput.Text = "You owe " & tax.ToString(“C�) & " in estate taxes."
Solution:
In the given lines of code, the constant named “ESTATE_TAX_EXEMPTION�, which is of the type, double, is initialized to 1000000 and the constant named “TAX_RATE�, which is of the type, decimal, is initialized to 0...
Want to see the full answer?
Check out a sample textbook solutionChapter 3 Solutions
Pearson eText for Introduction to Programming Using Visual Basic -- Instant Access (Pearson+)
- Urgent Answer pleasearrow_forwardQuestion2: Write a program to determine a student's final grade for (Structure, Strength of materials, and Engineering Mathematics) indicate whether it is passing or failing. The final grade is obtained by adding the sum of the oral, attendance, and theoretical activity grades to the average of the three material. by QBasicarrow_forward25. Repeat Programming Exercise 24, but the wire is to be bent in the form of a circle. In this case, the user specifies the length of the wire and the program outputs the radius and area of the circle. (You may assume that . Also declare it as a named constant.)arrow_forward
- PROGRAMMING PROBLEM The inventory of a shoe store lists shoes by stock number. With each stock number, there is associated a style number in the range of 0 to 50, the number of pairs in each size (sizes range from 3 to 14) and a price. A program is to be written to keep track of the inventory. The user is given the following choices: enter a new record, display a record, change the price of the stock item, or change the number on hand. When specifying a record the user may give either the stock number, or the style number. The array index can be used as a stock number. If the user decides to change the stock on hand, the program should ask which sizes will have their stock on hand changed. The program should be designed to run indefinitely, keeping track of changed in stock.arrow_forward5. Maximum Occurring Character Given a string, return the character that appears the maximum number of times in the string. The string will contain only ASCII characters, from the ranges ('a'-'z','A'-'Z','0'-'9'), and case matters. If there is a tie in the maximum number of times a character appears in the string, return the character that appears first in the string. Example text = abbbaacc Both 'a' and 'b'occur 3 times in text. Since 'a'occurs earlier, a is the answer. Function Description Complete the function maximum Occurring Character in the editor below. maximumOccurringCharacter has the following parameter: string text: the string to be operated upon Returns char: The most occurring character that appears first in the string. Constraints • 10 ≤ |text| ≤ 104 • All characters are alphanumeric, in the ranges ('a'-'z','A'-'Z','0'-'9') ======== 999992 14 15 16 17 18 19 20 21 2 2 2 2 22 23 24 25 2222 26 class Result { * * Complete the 'maximumOccurring Character' function below. * का…arrow_forward4. Contoso Workshops Modify the Contoso Workshops assignment from Chapter 3. The modified program takes as input the number associated with the workshop choice and the number associated with the location choice. The program will calculate and display the registration fee, lodging cost, and Total for the selected workshop and location. You will use three functions for this program. One function will display the Workshop and Lodging menus and return the menu choices for each, a second function will calculate and return the lodging cost, and a third function will calculate and return the Total Cost. The tables below show the workshops and lodging information. Be sure to define a main function. Workshop Number of Days Registration Fee Handling Stress 3 $2,000 Time Management 3 $800 Supervision Skills 3 $1,500 How to Interview 1 $500 Lodging Location Lodging Fees per Day Austin $150 Chicago $225 Phoenix $175…arrow_forward
- QUESTION 3 3| Bachelor of Engineering (a) The length of a month varies from 28 to 31 days. In this task you are required to create a program that reads the name of a month from the user as a string. Then your program should display the number of days in that month. Display '28 or 29 days' for F'ebruary so that leap years are addressed. (b) A triangle can be classified based on the lengths of its sides as equilateral. isosceles or scalene. All 3 sides of an equilateral triangle have the same length. An isosceles triangle has two sides that are the same lengths and a third side that is a different length. If all of the sides have different lengths then the triangle is scalene. Write a program that reads the lengths of 3 sides of triangles from the user. Display a message indicating the type of the triangle. f(r) = ar? - lr - e (c) A univariate quadratic function has the form: where a, b and e are constants, and a is non-zero. The roots of a quadratic function can be found by finding the…arrow_forwardCSCI250L Sample Exam 1 Spring 2020-2021 Write a program that prompts the user to enter the name, the number of children, and the basic salary of an cmployee. The program will then: Calculate the bonus: Calculate the new salary: • Apply a tax of 10% and find the paid salary: The program will then display all the information neceded as shown in the sample run below Sample Run: Enter the name of the employee: Jamal Enter the number of children of the employee: 4 Enter the salary of the employee (in $): 1500 The calculated bonus is $100 for 4 children. The new salary is $1600.0 The paid salary for Jamal is $1440.0 Page 2 1 3arrow_forwardPython questionarrow_forward
- The credit plan at TidBit Computer Store specifies a 10% down payment and an annual interest rate of 12%. Monthly payments are 5% of the listed purchase price, minus the down payment. Write a program that takes the purchase price as input. The program should display a table, with appropriate headers, of a payment schedule for the lifetime of the loan. Each row of the table should contain the following items: The month number (beginning with 1) The current total balance owed The interest owed for that month The amount of principal owed for that month The payment for that month The balance remaining after payment The amount of interest for a month is equal to balance × rate / 12. The amount of principal for a month is equal to the monthly payment minus the interest owed.arrow_forwardThe credit plan at TidBit Computer Store specifies a 10% down payment and an annual interest rate of 12%. Monthly payments are 5% of the listed purchase price, minus the down payment. Write a program that takes the purchase price as input. The program should display a table, with appropriate headers, of a payment schedule for the lifetime of the loan. Each row of the table should contain the following items: The month number (beginning with 1) The current total balance owed The interest owed for that month The amount of principal owed for that month The payment for that month The balance remaining after payment The amount of interest for a month is equal to balance × rate / 12. The amount of principal for a month is equal to the monthly payment minus the interest owed. An example of the program input and output is shown below: Enter the puchase price: 200 Month Starting Balance Interest to Pay Principal to Pay Payment Ending Balance 1 180.00 1.80 7.20 9.00 172.80 2 172.80 1.73 7.27…arrow_forwardTranscribed Image Text Write a program that asks for the principal, the annual interest rate, and the number of times the interest is compounded. It should display a report similar to the following: Interest Rate: 4.25% Times Compounded: 12 Principal: $ 1000.00 Interest: 43.33 Final balance: $ 1043.33arrow_forward
- C++ for Engineers and ScientistsComputer ScienceISBN:9781133187844Author:Bronson, Gary J.Publisher:Course Technology PtrC++ Programming: From Problem Analysis to Program...Computer ScienceISBN:9781337102087Author:D. S. MalikPublisher:Cengage LearningMicrosoft Visual C#Computer ScienceISBN:9781337102100Author:Joyce, Farrell.Publisher:Cengage Learning,