ARRAYS WHAT DO YOU REMEMBER?

1 / 20

# ARRAYS WHAT DO YOU REMEMBER? - PowerPoint PPT Presentation

ARRAYS WHAT DO YOU REMEMBER?. 30 SECONDS. All Arrays consist of two parts, the I….. a nd the E…….. In an Array, what is I and what is E?. 30 Seconds. Dim numberArray () As Integer = {5, 13, 3, 8, 7 } For i As Integer = 0 To numberArray.GetUpperBound(0 ) Console.Write ( i & “ “) Next

I am the owner, or an agent authorized to act on behalf of the owner, of the copyrighted work described.

## PowerPoint Slideshow about 'ARRAYS WHAT DO YOU REMEMBER?' - joshua

Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author.While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server.

- - - - - - - - - - - - - - - - - - - - - - - - - - E N D - - - - - - - - - - - - - - - - - - - - - - - - - -
Presentation Transcript

### ARRAYSWHAT DO YOU REMEMBER?

30 SECONDS

All Arrays consist of two parts, the I….. and the E……..

In an Array, what is I and what is E?

30 Seconds

Dim numberArray() As Integer = {5, 13, 3, 8, 7}

For i As Integer = 0 To numberArray.GetUpperBound(0)

Console.Write(i & “ “)

Next

What will be the contents of the console when this code is executed?

30 Seconds

Dim pets() As String = {"Jeff", "Bailey", "Mutt", "Sally"}

Console.WriteLine(pets(2))

What will be the contents of the console when this code is executed?

30 Seconds

Name the four components of the Von Neumann Architecture

30 Seconds

Dim pets() As String

pets(0) = "Dog”

pets(1) = "Cat”

pets(2) = "Bird”

pets(3) = "Snake”

Console.WriteLine(pets(1))

What will be the contents of the console when this code is executed?

1Minutes

Convert the following two’s compliment binary number into decimal.

10001000 =

5 Minutes

Code has been emailed to you

30 SECONDS

All Arrays consist of two parts, the I….. and the E……..

Index

Element

30 Seconds

Dim numberArray() As Integer = {5, 13, 3, 8, 7}

For i As Integer = 0 To numberArray.GetUpperBound(0)

Console.Write(i& “ “)

Next

0 1 2 3 4

30 Seconds

Dim pets() As String = {"Jeff", "Bailey", "Mutt", "Sally"}

Console.WriteLine(pets(2))

Mutt

30 Seconds

Name the four components of the Von Neumann Architecture

Processor, Main Memory, Input/Output, System Bus

30 Seconds

Dim pets() As String

pets(0) = "Dog”

pets(1) = "Cat”

pets(2) = "Bird”

pets(3) = "Snake”

Console.WriteLine(pets(1))

Nothing, size has not been defined in the parameter for the array

2 Minutes

Convert the following two’s compliment binary number into decimal.

10001000 = -120

5 Minutes

Dim lengthOfRectangle As Double

Console.Write("How long is the rectangle? ”)

Dim widthOfRectangle As Double

Console.Write("How wide is the rectangle? ”)

Call computeArea(lengthOfRectangle, widthOfRectangle)

METHOD 1

Sub Main()

Dim numberArray() As Integer = {5, 13, 3, 8, 7}

Console.WriteLine("Methods of writing Array contents to the console”)

Console.WriteLine("MethodOne”)

For i As Integer = 0 To numberArray.GetUpperBound(0)

Console.Write(numberArray(i) & " ”)

Next

Console.WriteLine()

End Sub

METHOD 2

Console.WriteLine("Method Two”)

For Each element As Integer In numberArray

Console.Write(element & " ”)

Next

METHOD 3

Console.WriteLine("MethodThree”)

Array.ForEach(numberArray, Sub(i As Integer)

Console.Write(i & " ”)

End Sub)

METHOD 4

Console.WriteLine("Method Four”)

Array.ForEach(numberArray, Sub(i As Integer) Console.Write(i & " "))