Please complete all the requested tasks with Visual Basic. Please submit your la
ID: 672904 • Letter: P
Question
Please complete all the requested tasks with Visual Basic. Please submit your lab codes (The first 3 questions) online, not later than 20 minutes before the end of session. The marking will start 20 Minutes before the end of the session. For your assignment you have time to submit it until Monday 12.2015 @ 11:59. The late submission has no mark (Zero). Write a program to convert miles, yards, feet and inches to a metric System Length. After the number of miles, yards, feet and inches are read the length should be converted entirely to inches and the divided by 39.37 to obtain the value in meters. The Int function should be used to break the total number of meters into a whole number of kilometers and meters. The number of centimeters should be displayed to one decimal place. The needed formula are as follows: Total inches=63360*miles+36*yards+ I2*feet+ inches Total melers=Total inches/39.37 Kilometers=Int (meters/1000) "The form shows just an example" If A dollar are borrowed at r% interest compounded monthly to purchase a car with monthly payments for n years, then the monthly payment is given by the formula. Monthly payment-* (i/( I -(1 +i)-12x)).A Where i=r/l 200 Write a program that calculates the monthly payment after the user gives the amount of the loan, interest rate, and number of years. The example shows that monthly payments of $234.23 are required to pay a 5-year loan of $I2000 at 6.4% interest.Explanation / Answer
‘ Project: Length Conversion
‘ Programmer: Your Name Here
‘ Date: July 17, 2014
‘ Description: Converts US length to metric length
Public Class frmLengthConversion
Private Sub btnConvert_Click(sender As Object, e As EventArgs) Handles btnConvert.Click
Dim miles As Integer = CInt(txtMiles.Text)
Dim yards As Integer = CInt(txtYards.Text)
Dim feet As Integer = CInt(txtFeet.Text)
Dim inches As Integer = CInt(txtInches.Text)
Dim totalInches As Double = 63360 * miles + 36 * yards + 12 * feet + inches
Dim totalMeters As Double = totalInches / 39.37
Dim kilometers As Integer = CInt(totalMeters / 1000)
Dim meters As Integer = CInt(totalMeters Mod 1000)
Dim centimeters As Double = (totalMeters * 100) Mod 100
lstOutput.Items.Add(“The metric length is”)
lstOutput.Items.Add(kilometers & ” kilometers”)
lstOutput.Items.Add((meters).ToString(“N0) & ” meters”)
lstOutput.Items.Add((centimeters).ToString(“N1) & ” centimeters.”)
End Sub
End Class
Related Questions
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.