Monday 3 March 2014

3.1.2 Classes

Classes are empty templates that a programmer can create objects or things to program with. They allow you to create custom data structures. Each object created contains data about itself. Some of these things can include: Cars, animals and items in a vending machine

Monday 24 February 2014

3.1.3 Defining flow control

To start/stop the flow chart you must have a sausage type shape
To process or make a statement you must use a rectangular shape
To ask a question you must use a diamond shape with a yes and no line coming off of it and going to to a process 

3.1.3 Program flow control

Sequence - A set of instructions in an order.  each action follows the previous one
Selection - If statements, choice, pathways through code
Iteration - Looping or repeating actions

3.1.2 Linked Lists


In computer science, a linked list is a data structure consisting of a group of nodes which together make a sequence. Each node is made up of some data and a reference (in other words, a link) to the next node in the sequence.

3.1.2 Two Dimensional Arrays

A Two Dimensional Arrays is a list of lists. For example a game of darts Turn (a list of the scores of 3 darts in a players )
Leg (a list of the turns a player has in that leg)
19
60
20
20
20
60
60
60
60

Wednesday 5 February 2014

3.1.1 The purpose of data types within code


Data can be kept in many different forms
A computer uses special internal codes to keep track of the different types of data that it processes

Programming languages use different data types to make best use of space.  E.g. Floats take up more room than integers.

3.1.1 Naming Variables


A variable name can be as short as a single letter, but it cannot be a number e.g.
a = ...... (good)
9 =.......(bad)

The name of a variable can start with a underscore ( _ )
A good variable name is specific to the information being stored.  E.g. firstName