Draw flowchart, write an algorithm and program in visual basic to select a company name, display the names in combo box.
Company Name: TVS, Hero Honda
After selecting the company name the list of corresponding vehicles Should be displayed in combo box.
Vehicle name: TVS-fiero, victor
: Hero Honda- Ambition,CBZ.
After selecting vehicle name the list of colors available and their rates should be displayed in combo box.
Colors: fiero- black, Red
: victor yellow , blue.
: Ambition black, silver.
: cbz Metallic & black
Price : fiero 50000 Rs.
Victor 45000 Rs.
Ambition 48000 Rs.
CBZ 52000 Rs.
Allow the user to select the bank. After selection the rate of interest should be displayed automatically
Bank: ICICI, HDFC
Rate of interest : ICICI: 9% HDFC: 9.4%
Allow the user to select the duration. Duration of installment 12,18,24 months.
Input down payment Calculate the balance amount , interest amount and EMI (equal months installments)
Dim dp As Integer
Dim emi, amt, roi As Single
Private Sub cboCompany_Click()
cboVehicle. ClearIf cboCompany.Text = "TVS" Then
cboVehicle.Addltem "Fiero" ,0
cboVehicle.Addltem "Vector", 1ElsecboVehicle.Addltem "Ambition",0
cboVehicle.AddItem "CBZ", 1 End IfEnd SubPrivate Sub cboVehicle_Click()
cboColor. ClearIf cboVehicle. Text = "Fiero" Then
cboColor.AddItem "Black", 0cboColor.AddItem "Red", 1txtPrice.Text = "50000"
Elself cboVehicle.Text = "Victor" ThencboColor.AddItem "Yellow", 0cboColor.AddItem "Blue", 1txtPrice.Text = "45000"
Elself cboVehicle.Text = "Ambition" ThencboColor .Addltem "Black", 0cboColor.Addltem "Silver", 1 txtPrice.Text = "48000"
Else: cboVehicle.Text = "Ambition"
cboColor.Addltem "Metallic", 0
cboColor.Addltem "Black", 1
txtPrice.Text = "52000"
End IfcboColor.Text = Clear
End Sub
Private Sub optHDFC_Click()
txtrate.Text = "9.4 %" End Sub
Private Sub optICICI_Click()txtrate.Text = "9 %"
End Sub
Private SubtxtDPay_Validate (Cancel As Boolean)dp = CInt(txtDPay.Text) amt = CSng (txtPrice.Text) - dp
txtBalAmt.Text = CStr(amt)
If optICICI. Value = True Then
If opt12.Value = True Thenemi = ((amt * 9) / 100 + amt) / 12
Elself opt18.Value = True Thenemi = ((amt * 9) / 100 + (amt * 9) /100 / 2 + amt) / 18
Elself opt24.Value = True Thenemi = ((amt * 9) / 100 + (amt * 9) / 1000 * 2 + amt) / 24
End IftxtEMI. Text = emi
End IfIf optHDFC.Value = True Then
If opt12.Value = True Thenemi = ((amt * 9.4) / 100 + amt) / 12
ElseIf opt18.Value = True Thenemi = ((amt * 9.4) / 100 + (amt * 9.4) / 100 / 2 + amt) 18ElseIf opt24.Value = True Thenemi = ((amt * 9.4) / 100 + (amt * 9.4) / 1000 * 2 + amt) / 24End IftxtEMI.Text = emi
End If
End Sub