arrays what do you remember n.
Download
Skip this Video
Loading SlideShow in 5 Seconds..
ARRAYS WHAT DO YOU REMEMBER? PowerPoint Presentation
Download Presentation
ARRAYS WHAT DO YOU REMEMBER?

Loading in 2 Seconds...

play fullscreen
1 / 20

ARRAYS WHAT DO YOU REMEMBER? - PowerPoint PPT Presentation


  • 56 Views
  • Uploaded on

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

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

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


An Image/Link below is provided (as is) to download presentation

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
30 seconds
30 SECONDS

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

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

30 seconds1
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 seconds2
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 seconds3
30 Seconds

Name the four components of the Von Neumann Architecture

30 seconds4
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?

1 minutes
1Minutes

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

10001000 =

5 minutes
5 Minutes

Rectangle Programming Task

Code has been emailed to you

  • Complete the programming task
  • Write the 5 lines of code onto your answer sheet
30 seconds5
30 SECONDS

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

Index

Element

30 seconds6
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 seconds7
30 Seconds

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

Console.WriteLine(pets(2))

Mutt

30 seconds8
30 Seconds

Name the four components of the Von Neumann Architecture

Processor, Main Memory, Input/Output, System Bus

30 seconds9
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
2 Minutes

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

10001000 = -120

5 minutes1
5 Minutes

Rectangle Programming Task

Dim lengthOfRectangle As Double

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

lengthOfRectangle = CDbl(Console.ReadLine)

Dim widthOfRectangle As Double

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

widthOfRectangle = CDbl(Console.ReadLine)

Call computeArea(lengthOfRectangle, widthOfRectangle)

method 1
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()

Console.ReadKey()

End Sub

method 2
METHOD 2

Console.WriteLine("Method Two”)

For Each element As Integer In numberArray

Console.Write(element & " ”)

Next

method 3
METHOD 3

Console.WriteLine("MethodThree”)

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

Console.Write(i & " ”)

End Sub)

method 4
METHOD 4

Console.WriteLine("Method Four”)

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