Q [An Introduction to Programming using Visual Basic Ed 11, Ch 6.2 Q# 26]- When $1,000 is invested at 5% simple interest, the amount grows by $50 each year. When money is invested at 5% interest compounded annually, the amount at the end of the year is 1.05 times the amount at the beginning of that year. Display the amounts for 9 years for a $1,000 investment at 5% simple and compound interest.    My Answer: Private Sub btnComputeGrowthMoney_Click(sender As Object, e As EventArgs) Handles btnComputeGrowthMoney.Click         'Display simple interest and compound interest from 1 to 9         Dim simple, compound, principal As Decimal         Dim rate As Double         Dim year As Integer         lstInterest.Items.Clear()         principal = 1000         rate = 0.05         simple = principal * (1 + rate * year)         compound = principal * (1 + rate) ^ year         For year = 1 To 9             lstInterest.Items.Add("YEAR" & " " & "SIMPLE INTEREST" & " " & "COMPOUND INTEREST")             lstInterest.Items.Add(year & " " & simple.ToString("N") & " " & compound.ToString("C"))         Next     End Sub   Error message after running the script Severity Code Description     Line Suppression State Error BC30456 'Items' is not a member of 'TextBox'.     9 Active

Database System Concepts
7th Edition
ISBN:9780078022159
Author:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Chapter1: Introduction
Section: Chapter Questions
Problem 1PE
icon
Related questions
Question
100%

Q [An Introduction to Programming using Visual Basic Ed 11, Ch 6.2 Q# 26]- When $1,000 is invested at 5% simple interest, the amount grows by $50 each year. When money is invested at 5% interest compounded annually, the amount at the end of the year is 1.05 times the amount at the beginning of that year. Display the amounts for 9 years for a $1,000 investment at 5% simple and compound interest. 

 

My Answer:

Private Sub btnComputeGrowthMoney_Click(sender As Object, e As EventArgs) Handles btnComputeGrowthMoney.Click

        'Display simple interest and compound interest from 1 to 9

        Dim simple, compound, principal As Decimal

        Dim rate As Double

        Dim year As Integer

        lstInterest.Items.Clear()

        principal = 1000

        rate = 0.05

        simple = principal * (1 + rate * year)

        compound = principal * (1 + rate) ^ year

        For year = 1 To 9

            lstInterest.Items.Add("YEAR" & " " & "SIMPLE INTEREST" & " " & "COMPOUND INTEREST")

            lstInterest.Items.Add(year & " " & simple.ToString("N") & " " & compound.ToString("C"))

        Next

    End Sub

 

Error message after running the script

Severity

Code

Description

   

Line

Suppression State

Error

BC30456

'Items' is not a member of 'TextBox'.

   

9

Active

Expert Solution
trending now

Trending now

This is a popular solution!

steps

Step by step

Solved in 3 steps with 2 images

Blurred answer
Knowledge Booster
Mathematical functions
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Similar questions
  • SEE MORE QUESTIONS
Recommended textbooks for you
Database System Concepts
Database System Concepts
Computer Science
ISBN:
9780078022159
Author:
Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:
McGraw-Hill Education
Starting Out with Python (4th Edition)
Starting Out with Python (4th Edition)
Computer Science
ISBN:
9780134444321
Author:
Tony Gaddis
Publisher:
PEARSON
Digital Fundamentals (11th Edition)
Digital Fundamentals (11th Edition)
Computer Science
ISBN:
9780132737968
Author:
Thomas L. Floyd
Publisher:
PEARSON
C How to Program (8th Edition)
C How to Program (8th Edition)
Computer Science
ISBN:
9780133976892
Author:
Paul J. Deitel, Harvey Deitel
Publisher:
PEARSON
Database Systems: Design, Implementation, & Manag…
Database Systems: Design, Implementation, & Manag…
Computer Science
ISBN:
9781337627900
Author:
Carlos Coronel, Steven Morris
Publisher:
Cengage Learning
Programmable Logic Controllers
Programmable Logic Controllers
Computer Science
ISBN:
9780073373843
Author:
Frank D. Petruzella
Publisher:
McGraw-Hill Education