PROGRAMMING    Lesson 2
      BASICS
GO TO THE WIKISPACE!
Click the link to answer the
SOCTRATIVE question.


NO-CONFERING!!!



ROOM NUMBER =
954574

  www.glyncomputing.wikispaces.com
LESSON OBJECTIVES
Understand the fundamental principals of object orientated programming:
       Objects
       Commands           All
       Variables
AND
       Branching
       Loops              Some
       Sub-routines
ON THE WIKISPACE!
Go to the
programming page to
get resources you
need
USE THE SHEET TO
RECORD YOUR
PROGRESS
You can use this to
help you add to your
revision powerpoint!
OBJECTS – SPEND 5 MINS WITH
THIS CODE AND IDENTIFY
WHICH ARE THE OBJECTS AND
WHICH ARE THE COMMANDS?
            End
OBJECT- DOG
Objects have states.
Dog is brown
Dog is called Barry
AND behaviours
Barry is sitting
Barry is barking
OBJECT- DOG
  COMMAND!
Barry.fetch(slippers)
UPDATE
YOUR SHEET
  Objects and Commands!
2 minutes

            2mins


End
OBJECT- DOG
  VARIABLES
Barry.fetch(slippers)
slippers = 2
VARIABLES

 Where are
the
variables
in the
code?
10 minutes
WRITE YOUR OWN CODE:
At least 4 OBJECTS
At least 3 VARIABLES
Try and include a branch and a
loop!
PLENARY
Write your definition of a VARIABLE in socrative
Then
Lets vote on which is the best definition and why
LASAGNE INGREDIENTS
Tomatoes
Dried Lasagne Sheets
Minced Pork
Minced Beef
                        See Recipe for
Homemade Béchamel Sauce Homemade
                          Béchamel Sauce
Can you draw
STARTER     a parallel
          between this
           camel and
          anything you
          have done so
            far in our
          programming
             project?
CAMEL CASE
I want to make a new program to calculate the
interest I am earning on my savings account.


 CalculateInterest
LESSON OBJECTIVES
Be able to effectively plan our programming projects:
-Using Pseudocode
-And Flow diagrams

Understand why it is important to use pseudocode and flow
diagrams to plan programs.
PLANNING PROGRAMS
 Pseudo-code – What is it? Why use
it?
GROUPS OF 3

Write the pseudocode for a program that makes
lasagne

     PROGRAM MakeLasagne:
       <Do stuff>
     END.
BRANCHING OR SELECTION

What if you are cooking for a vegetarian?
You need to branch or select.
Edit your code to reflect this.
LOOPS OR ITERATION

What if you need to tell the computer to keep doing
something until a condition occurs?
For example; I want to keep frying the mince until it
is brown.

Programming basics

Editor's Notes

  • #8 What object states and behaviours are in the code?
  • #9 This is a command we could give to a dog
  • #11 This is how Barry will be able to remember what he needs to do.It’s a piece of information with a name for that information.
  • #15 Sub-Routine