I have 2 papers need IT ONLY PROGRAMMERS HELP

profiletwada3

Assignment 2

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

 

 

 

 

 

SECOND PAPER

 

 Written Assignment 1

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. Describe the contents of the text box after the button is clicked.

Private Sub btnOutput_Click(...) Handles btnOutput.Click

txtBox.Text = "Goodbye"

txtBox.Text = "Hello"

End Sub

For questions 2 and 3, assume that the three objects on the form were created in the order txtFirst, txtSecond, and lblOne. Determine the output displayed in lblOne when the program is run and the Tab key is pressed. Note: Initially, txtFirst has the focus.

2. Private Sub txtFirst_Leave(...) Handles txtFirst.Leave

lblOne.BackColor = Color.White

lblOne.Text = "Hello"

End Sub

3. Private Sub txtSecond_Enter(...) Handles txtSecond.Enter

lblOne.Visible = False

lblOne.Text = "Hello"

End Sub

4. Determine the errors.

Private Sub btnOutput_Click(...) Handles btnOutput.Click

txtBox = "Hello"

End Sub

For questions 5 and 6, write a program with a Windows-style interface to carry out the task.

5. A form contains two text boxes and one large label between them with no preset caption. When the first text box receives the focus, the label reads "Enter your full name." When the second text box receives the focus, the label reads "Enter your phone number, including area code."

6. Simulate a traffic light with three small square text boxes placed vertically on a form. Initially, the bottom text box is solid green and the other text boxes are dark gray. When the Tab key is pressed, the middle text box turns yellow and the bottom text box turns dark gray. The next time Tab is pressed, the top text box turns red and the middle text box turns dark gray. Subsequent pressing of the Tab key cycles through the three colors. Hint: First place the bottom text box on the form, then the middle text box, and finally the top text box.

 

    • 9 years ago
    • 40
    Answer(1)

    Purchase the answer to view it

    blurred-text
    NOT RATED
    • attachment
      assignment1vb.docx
    • attachment
      assignment2vb.docx
    Bids(1)