Answer to Question #301054 in Visual Basic for Vhenz

Question #301054

Programming Tasks: Apply all the things you have learned in this module. All program


should detect events like click on the buttons and keypress to detect inputs.


Task 1: Design and develop a program that will accept inputs like Name, Course and


Year Level. These inputs will be displayed in a message box after a button is clicked.


Task 2: Design and develop a program that will compute the take home amount for the


loanable amount of the customer. For example, if the customer’s loanable amount is


100,000.00 and has a 3% per annum interest. The company will deduct the interest for 5


years which is (15,000.00) to the loanable amount, so, the take home amount of the


customer is 85,000.00. Your program allows the user to input loanable amount and how


many years for the customer to pay the loan. Set the interest per annum to 3%.

1
Expert's answer
2022-02-22T13:42:51-0500

Task 1:




Public Class Form1


    Private Sub btnDisplay_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnDisplay.Click
        Dim info As String = "Name: " + txtName.Text + Environment.NewLine
        info += "Course: " + txtCourse.Text + Environment.NewLine
        info += "Year Level: " + txtYearLevel.Text + Environment.NewLine
        MessageBox.Show(info)
    End Sub
End Class


Task 2:





Imports System.IO


Module Module1
   
    Sub Main()
        'Set the interest per annum to 3%.
        Const interestPerAnnum As Double = 0.03D




        Console.Write("Enter loanable amount: ")
        Dim loanableAmount As Double = Double.Parse(Console.ReadLine())
        Console.Write("How many years for the customer to pay the loan?: ")
        Dim years As Integer = Integer.Parse(Console.ReadLine())






        Dim takeHomeAmount As Double = loanableAmount - (loanableAmount * (years * interestPerAnnum))
        Console.WriteLine("The take home amount of the customer is : {0}", takeHomeAmount.ToString("C"))






        Console.ReadLine()
    End Sub
End Module

Need a fast expert's response?

Submit order

and get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!

Comments

No comments. Be the first!

Leave a comment

LATEST TUTORIALS
New on Blog
APPROVED BY CLIENTS