'This program compares interest rates between two banks and determines the best bank
'Eric Weber, Adam Litchfield, Eric Romero, Sarah, Alex, Amy
'10/5/12
'Lab #4 Problem 42
'CSC 142 Section 2
PublicClassForm1
PrivateSub Button1_Click(sender AsSystem.Object, e AsSystem.EventArgs) Handles Button1.Click
'Declarations
Dim annualInterest1, annualInterest2, annualInterestAPY1, numberCompoundedPeriods1, annualInterestAPY2, numberCompoundedPeriods2 AsDouble
'Input
annualInterest1 = CDbl(TextBox1.Text)
annualInterest2 = CDbl(TextBox4.Text)
numberCompoundedPeriods1 = CDbl(TextBox2.Text)
numberCompoundedPeriods2 = CDbl(TextBox5.Text)
'Processing
annualInterestAPY1 = (1 + ((annualInterest1 / 100) / (numberCompoundedPeriods1)) ^ numberCompoundedPeriods1 - 1)
annualInterestAPY2 = (1 + ((annualInterest2 / 100) / (numberCompoundedPeriods2)) ^ numberCompoundedPeriods2 - 1)
'Output
TextBox3.Text = CStr(annualInterestAPY1 * 100)
TextBox6.Text = CStr(annualInterestAPY2 * 100)
EndSub
EndClass