Preview

Visual Basic Practical File

Good Essays
Open Document
Open Document
3284 Words
Grammar
Grammar
Plagiarism
Plagiarism
Writing
Writing
Score
Score
Visual Basic Practical File
Practical 1

Aim: - WAP to perform arithmetic operation using command buttons. (Declare variables globally).

Design:-

Source code :-

Path :- F:\Program Files\Microsoft Visual Studio\COMMON\IDE\IDE

‘Initialize variable global
Dim a, b, c As Integer
‘event for clear content
Private Sub Command1_Click()
‘clear text box
Text1.Text = ""
Text2.Text = ""
Text3.Text = ""

End Sub

‘option for addition
Private Sub Option1_Click() a = Val(Text1.Text) b = Val(Text2.Text)
‘Perform operation c = a + b
Text3.Text = c
Label4.Caption = "Addition of two given number ="
End Sub
‘option for sub
Private Sub Option2_Click() a = Val(Text1.Text) b = Val(Text2.Text) c = a - b
Text3.Text = c
Label4.Caption = "Subtraction of two given number ="
End Sub
‘option for multiplication
Private Sub Option3_Click() a = Val(Text1.Text) b = Val(Text2.Text) c = a * b
Text3.Text = c
Label4.Caption = "Multiplication of two given number ="
End Sub
‘option for division
Private Sub Option4_Click() a = Val(Text1.Text) b = Val(Text2.Text) c = a / b
Text3.Text = c
Label4.Caption = "Division of two given number ="
End Sub
‘option for modulas
Private Sub Option5_Click() a = Val(Text1.Text) b = Val(Text2.Text) c = a Mod b
Text3.Text = c
Label4.Caption = "Modulus of two given number ="
End Sub

Practical 2

Aim :- WAP to take input of principal, rate & time and calculate simple interest & compound interest.

Design:-

Source code:-

Path:- E:\Documents and Settings\ss\Myfiles

‘variable declaration globally
Dim SI, CI, P, R, T, AMT, I, EXP As Double
‘command for clear textbox
Private Sub Command1_Click()
Text1.Text = ""
Text2.Text = ""
Text3.Text = ""
Text4.Visible = False
Label5.Visible = False
End Sub
‘command for exit from program

Private Sub Command2_Click()
End
End Sub

‘set height and width of form
Private Sub Form_Load()
Label5.Visible = False
Text4.Visible = False
Form1.Width = 15000
Form1.Height = 8500
End Sub
‘calculate simple interest
Private Sub Option1_Click()
Label5.Visible = True

You May Also Find These Documents Helpful

  • Satisfactory Essays

    Hrm/531 Final Exam Paper

    • 807 Words
    • 4 Pages

    (b) Calculate both total $ payments for the stream of payments, the stream of principal payments, and the stream of interest payments. Also calculate the present value of these 3 streams. [To calculate the present value of interest and principal payments, you will need to use the NPV function, rather than the PV function, since the cash flows in the principal and interest columns are not constant throughout time.] What do you observe when you look at these numbers? Explain.…

    • 807 Words
    • 4 Pages
    Satisfactory Essays
  • Satisfactory Essays

    Unit 9 Assignment

    • 796 Words
    • 4 Pages

    To find payment amounts, you may use Excel, the EZ Calculators app, or the tables in the Chapter if those tables have the needed values. When finding an APR, give an exact value using Excel or the EZ Calculators app. Show work.…

    • 796 Words
    • 4 Pages
    Satisfactory Essays
  • Satisfactory Essays

    Mis 302 Flowchart

    • 262 Words
    • 2 Pages

    You are required to design the logic for the following draw the Flow chart using compound condition where ever possible and write the Java program calculating the suitable loan rates for the Local Credit Union.…

    • 262 Words
    • 2 Pages
    Satisfactory Essays
  • Satisfactory Essays

    Mathl 104 Research Paper

    • 428 Words
    • 2 Pages

    Technology is pervading all levels of mathematics teaching and learning in our modern world, bringing ever more sharply into focus the change from traditional pencil and paper learning to a mixture of calculator, computer and pencil and paper learning environments. Currently the loan has 25 years remaining. Therefore to find out the P&I payment, you would plug in 300 for N (25x12), 5.75% for I, 0 for FV, and $112,242.47 for PV, and then press PMT which gives you the $706.12. However, we want to find out how much more money they have to pay to pay off the loan in 20 years instead of 25. Therefore change N to 240 (20x12) instead of 300. Then press PMT and we should get $788.04. Next, subtract the P&I payment they are making now (706.12) from $788.04, which tells you they need to pay $81.92 extra towards the principal each month to have the loan paid off in 20 years instead of 25.…

    • 428 Words
    • 2 Pages
    Satisfactory Essays
  • Satisfactory Essays

    2. Multiply the (principal + first quarter interest) by ¼ of the interest rate to…

    • 208 Words
    • 7 Pages
    Satisfactory Essays
  • Powerful Essays

    The going interest rate per year = 10%, the number of years, N = 20, future value, FV = 1,000, and present value, PV = 865.…

    • 1735 Words
    • 7 Pages
    Powerful Essays
  • Good Essays

    Programing Problems

    • 721 Words
    • 3 Pages

    Input NumberMonths End User Input Module Monthly Rate Module MonthlyRate = InterestRate/1200 End Monthly Rate Module Payment Calculation Module Payment = LoanAmt * MonthlyRate * (1 + MonthlyRate)^NumberMonths ÷ ((1 + MonthlyRate)^NumberMonths – 1) End Payment Calculation Module Display module Display “Your monthly payment will be” Payment “.”…

    • 721 Words
    • 3 Pages
    Good Essays
  • Good Essays

     r A  P1    n A is the amount of the return. P is the principal amount initially deposited. r is the annual interest rate (expressed as a decimal). n is the number of compound periods in one year. t is the number of years.…

    • 441 Words
    • 2 Pages
    Good Essays
  • Satisfactory Essays

    A. Problem Analysis – Here are the input data, output data and processing step to convert input data into output data. 1. Input Data: a. Loan Amount (P) b. Annual percentage rate of interest (r) c. Number of monthly payments (N). 2. Output data: Monthly Payment (M) 3. Processing: The output M can be obtained from the input data by using the following formula: M = P * R* (1+R)^N/((1+R) ^N-1) where R =r/1200 B. Program Design – The program will consist of the following modules: Main Module Input Data Module (sub-module) Perform Calculations Module (sub-module) Output Data Module (sub-module) Main module Write “This program will compute the monthly payment based on the loan amount, the annual percentage rate of interest, and the number of monthly payments.” Declare P As Float Declare r As Float Declare N As Integer Declare M As Float Call Input Data Module Call Perform Calculations Module Call Output Data Module End Program…

    • 345 Words
    • 2 Pages
    Satisfactory Essays
  • Satisfactory Essays

    the years of me

    • 473 Words
    • 2 Pages

    3)Create a graph that shows the growth of your compound interest and simple interest investment investment over time.…

    • 473 Words
    • 2 Pages
    Satisfactory Essays
  • Powerful Essays

    An amount is deposited for eight years at 8%. If compounding occurs quarterly, then the table value is found at (adjust rate and number of periods!)…

    • 3044 Words
    • 13 Pages
    Powerful Essays
  • Powerful Essays

    * Use a graphical interface to allow a user to input a principle amount, interest rate…

    • 763 Words
    • 4 Pages
    Powerful Essays
  • Satisfactory Essays

    = Prn P r n x= sum of scores number of scores is initial amount is interest rate per period, expressed as a decimal is number of periods z-score For any score x, z= Compound interest A = P (1 + r )…

    • 734 Words
    • 3 Pages
    Satisfactory Essays
  • Powerful Essays

    In the space provided below to copy and paste the remainder of your VBScript sourcecode.…

    • 642 Words
    • 3 Pages
    Powerful Essays
  • Good Essays

    Course Syllabus

    • 853 Words
    • 4 Pages

    It is strongly recommended that the student have access to a financial calculator that is capable of TVM (time-value of money), NPV (net-present value), and IRR (internal rate of return) calculations. The Texas Instrument BA II Plus series is an excellent solution.…

    • 853 Words
    • 4 Pages
    Good Essays

Related Topics