GoConqr hat ein neues Design! Sag uns, wie es dir gefällt.

Mindmap

Section 5 - Programming

Jake Bailey Computing Year 11 Englisch

Inhalt der Mindmap

Section 5 - Programming

  1. Strings

    • String Manipulators
      • x.upper
        • Changes all characters in string x to upper case
      • x.lower
        • Changes all characters in string x to lower case
      • x.length
        • Returns the number of characters in string x
      • x[i]
        • Extracts the character in position i from string x
      • x.subString(a,b)
        • Extracts a string starting at position a with length b from string x
  2. Arrays

    • Arrays are used to store multiple data values
      • An array is a data structore that can store a collection of data values all under one name
      • Each piece of data in an array is called an element
        • Each element can be accessed using its position or index in the array
      • Arrays are most helpful when you have lots of related data that you want to store and it doesn't make sense to use separate variables
      • Some languages require you to declare arrays before they are used
    • One-dimensional arrays are like lists
      • Creating arrays
        • ARRAY array_name[x]
          • array_name[0] = "Hello"
            • This sets array_name's position 0 to "Hello"
          • array_name would be the name you choose for the array
          • x being the number of data pieces you need
      • Retrieving elements
        • print(array_name[0])
          • This will print what's in position 0 of the array_name array
      • Changing Elements
        • array_name[0] = "Bonjour"
          • This will then change the data in position 0 to "Bonjour
    • Two-dimensional arrays are like lists of lists
      • The position of an element is written as [a, b] or [a][b]
        • a represents the position of the one-dimensional list that the element is in
        • b represents its position within that one-dimensional list
      • Example
        • trees = [["oak", "ash"], ["beech", "cedar"], ["pine", "elm"]]
  3. File Handling

    • Must start by opening the external file
      • Example
        • newFile = openRead("newFile.txt")
          • newFile = openWrite("newFile.txt")
    • Once the file has been opened you can continue to write to it until you close it
      • newFile.close()
  4. Storing Data

    • Databases
      • Databases store data in tables
        • The columns of these tables are called fields
        • The rows are called records
      • A field is used to store a category
        • A record will use the fields to store details about a specific item
      • All data values in the same field must be the same data type
        • But... data values in the same record can have different data types
      • Most Databases use SQL (Structured Query Language)
        • Create and Update tables
          • CREATE TABLE
            • This SQL statement will create a table with as many fields as you want
          • Once a table has been created you can add records to it
            • INSERT INTO
              • This SQL statement will insert the data into the table
          • To update a table you shall use the Update
            • UPDATE-SET-WHERE
  5. Sub Programs

    • Procedures and Functions will help to avoid repetition of code
      • Procedures are a set of instructions in which are stored under one name
        • Means if you want the program to do these instructions you just call the name
      • Functions are similar, however they always return a value
      • They can give your program more structure and readability while cutting the amount of code down
      • Sometimes you'll encounter parameters and arguments
        • Parameters
          • Special values used to pass values into a sub program, for each parameter you have to specify a name, data type and default value
        • Arguments
          • The actual values that the parameters take when the sub program is called
    • Variables can be local or global
      • Every variable has a scope
        • Each scope will tell you which parts of the program the variable can be used within
      • Local
        • Can only be used within the structure they're declared in
      • Global
        • Can be used any time after their declaration

Informationen

Beschreibung
Year 11 Computing Mindmap am Section 5 - Programming, erstellt von Jake Bailey am 17/04/2018.
Erstellt von
Jake Bailey
Aufrufe
0
Bewertung

Feedback

Worum geht es?

Wie gefällt dir das neue Design?

Dein Eindruck