QuestionQuestion

You are to create an array of 10 elements, String type, and load 10 unique values into the array, one value per element. Your program must then output those values into a Listbox control.

Note: Your program MUST use a loop to load the data into the array
myarray(0) = "Dog"
myarray(1) = "cat"
These methods above are NOT acceptable!

(Hint: use InputBox function
myarray(index) = Inputbox()      )
and another loop to output it to the Listbox control. How your program acquires the information is up to you, but processing must be done using loops.

Also note:
Dim myvalues() As String = {"val1", "val2"}
Is NOT an acceptable way to load you array for this assignment as this method doesn't utilize a loop.

Solution PreviewSolution Preview

These solutions may offer step-by-step problem-solving explanations or good writing examples that include modern styles of formatting and construction of bibliographies out of text citations and references. Students may use these solutions for personal skill-building and practice. Unethical use is strictly forbidden.

Public Class Form1

    ' declare an array
    Private myarray(0 To 9) As String

    ''' <summary>
    ''' run when the form is loaded
    ''' </summary>
    ''' <param name="sender"></param>
    ''' <param name="e"></param>
    Private Sub Form1_Load(sender As Object, e As EventArgs) Handles MyBase.Load
       ' index of the array
       Dim index As Integer = 0
       ' entered value
       Dim value As String
       ' unique flag
       Dim unique As Boolean

       ' the first loop
       While index < 10...

By purchasing this solution you'll be able to access the following files:
Solution.zip.

$20.00
for this solution

or FREE if you
register a new account!

PayPal, G Pay, ApplePay, Amazon Pay, and all major credit cards accepted.

Find A Tutor

View available Computer Science - Other Tutors

Get College Homework Help.

Are you sure you don't want to upload any files?

Fast tutor response requires as much info as possible.

Decision:
Upload a file
Continue without uploading

SUBMIT YOUR HOMEWORK
We couldn't find that subject.
Please select the best match from the list below.

We'll send you an email right away. If it's not in your inbox, check your spam folder.

  • 1
  • 2
  • 3
Live Chats