Who can help?

profileshodaj

Assignment 2                     Student’s Name:
Submit to your professor a MS Word document with replies to the following questions (keep the question’s text before each of your replies).

  • 1. Determine the output displayed in the list box by the lines of code.
    • Dim tax As Double
    • tax = 200
    • tax = 25 + tax
    • lstOutput.Items.Add(tax)
  • 2. Find the value of the given function where a and b are numeric variables of type Double, a = 5 and b = 3.
    • Math.Round(a/b)
  • 3. Determine the output displayed in the list box by the lines of code.
    • Dim m As Integer = 4
    • Dim n As Integer = 3
    • Dim s As String = "Microsoft"
    • Dim t As String = "soft"
    • lstOutput.Items.Add(s.Length)
    • lstOutput.Items.Add(s.ToLower)
    • lstOutput.Items.Add(s.Substring(m, n - 1))
    • lstOutput.Items.Add(s.IndexOf(t))
  • 4. Identify any errors.
    • Dim hiyo As String
    • hiyo = "Silver"
    • txtBox = "Hi-Yo " & hiYo
  • 5. Determine the output produced by the lines of code.
    • Const SALES_TAX_RATE As Double = 0.06
    • Dim price as Double = 100
    • Dim cost = (1 + SALES_TAX_RATE) * price
    • txtOutput.Text = FormatCurrency(cost)
  • 6. Identify any errors.
    • txtOutput.Text = FormatCurrency($1234)
  • 7. Write a program that asks for the amount of the bill and percentage tip and calculates the tip. The program should use variables for each of the quantities and display the outcome in a text box with a label. Test the program on a bill of $20 and a 15% tip.
    • 9 years ago
    • 5
    Answer(1)

    Purchase the answer to view it

    blurred-text
    • attachment
      assignment_answers.docx
    Bids(0)