csa computer4 lesson4

67 %
33 %
Information about csa computer4 lesson4
Education

Published on July 18, 2008

Author: sdreyes102877

Source: authorstream.com

Lesson 4 July 14 – 18, 2008 : Lesson 4 July 14 – 18, 2008 VB ARRAY 1 OBJECTIVES: Recognize the correct syntax of an array program. Determine the importance of an array codes. Declare the correct variable of an array program. Utilize array codes in different program conditions. "Ninety-nine percent of all failures come from people who have a habit of making excuses." -George Washington Carver What is VB Array? : What is VB Array? A Visual Basic Array is an object that contains a specified number of variables of the same type. NUMBER1 NUMBER2 NUMBER3 Once you have grouped all the variable values into the array you can then perform tasks like > sorting the array items into alphabetical or numerical order > accessing and changing the value assigned to each array item > passing the group of items. 2 NUMBER ARRAY NAME 1 - 3 INDEX NUMBER Datatype INTEGER Control Array : Control Array You can create a control array by replicating an object (label, textbox, command buttons, etc). 3 A pop up dialog box will appear: Do you want to create a CONTROL ARRAY? Click the YES button. OUTPUT: : OUTPUT: 4 CONTROL ARRAY is used in a object with the same functionalities. One good example of a control array is the CALCULATOR program. Declaring Arrays : Declaring Arrays Arrays are declared in the same manner as other variables using the DIM keyword. Except that the array bounds are coded in parentheses following the variable name. 5 The syntax for declaring an array: : The syntax for declaring an array: Dim arrayname (index) As datatype Example: Dim number(9) As Integer (declares a 10-element array, indexed 0 to 9) Dim arrayname (lowerbound to [upperbound) As datatype Example: Dim number(0 To 9) As Integer (same as above, with explicit lower bound) 6 Slide 7: 7 Sample declarations of Array: Slide 8: 8 SAMPLE PROGRAM: A program that prints 10 names on the form using two (2) variables. Num ( to encode in the input box 10 times.) StudentName (Array that will serve as the container of the encoded 10 names). Slide 9: 9 Slide 10: 10 Slide 11: 11 cmd3clearscreen cmd2exit Slide 12: 12 cmd1ADD Drill A July 14, 2008 : Drill A July 14, 2008 Determine if the given Array Declaration is Valid or Invalid. 1. Dim num(0 To 9) As Integer 2.Dim days(7) As String 3. Dim number(-4 To 5) As Integer 4. Dim name(10) As Integer 5. Dim months() As String 6. Dim name[] As String 7. Dim months( 1 – 10) As String 8. Dim weeknumber 1 To 20 As String 9. Dim X(3 To 12) As Long 13 Drill B July 14, 2008 : Drill B July 14, 2008 Write the correct Array declaration of the given condition. 1. 10 names 2. 12 months in a year 3. 20 students’ ages 4. numerical- variable-length array whose bounds will be determined at run-time 5. 10 car models 6. 40 students’ grades 7. 10 equation-exponentiation table 8. 10 plants 9. 5 letter grades 14

Add a comment

Related presentations

Related pages

Quia - CSA I Lesson 4 Computer Operating Systems

CSA I Lesson 4 Computer Operating Systems. Tools. Copy this to my account; E-mail to a friend; Find other activities; Start over; Help; Or log in to play ...
Read more

csa computer - Electronics Store - foursquare.com

csa computer. Electronics Store. Jalan Juanda 2, Kalimantan Timur, Indonesia. Directions. Total Visitors 4. Total Visits 6. Save. Share. See what your ...
Read more

RCX Programming, Lesson 4 - AU

RCX Programming. Lesson 4 In this lesson we present a program for a small LEGO car that does random walk with obstacle avoidance.
Read more

Lesson #4 – Bill Cara | Resources For Traders, Advisors ...

Lesson #4. The Twelve Analytics I use for trading. ... CSA=Comparative Strength (Alert) of two different price series RDA=Reporting Date (Alert)
Read more

30-1 Trig 1 Lesson 1 - YouTube

30-1 Trig 1 lesson 2 Part A - Duration: 24:23. Perry Kulmatyski 257 views. ... Lesson 4.3, part 1 - Trigonometry Extended - Duration: 38:48.
Read more

PC - CSL Sprint 5779 - Multimedia QuadCore! PC-System ...

PC - CSL Sprint 5779 (Quad) - Multimedia QuadCore! PC-System mit AMD A8-6600K APU 4x 3900 MHz, 1000GB SATA, 8192MB DDR3, Radeon HD 8570D, DVD-RW ...
Read more

Computer Lessons - Etiquette

Computer Lessons for seniors for beginners for fun, leisure and pleasure. ... Computer Lesson 4 – Menus, Toolbars & Shortcuts
Read more

Search › computer 4 excel lessons | Quizlet

Search results for: computer 4 excel lessons 500 Study Sets 500 Sets 2 Classes 500 Users; Advertisement Upgrade to remove ads
Read more