Programming basics
-
Upload
mckennadglyn -
Category
Documents
-
view
39 -
download
4
Transcript of Programming 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
Variables
AND
Branching
Loops
Sub-routines
All
Some
OBJECTS – SPEND 5 MINS WITH THIS CODE AND IDENTIFY WHICH ARE THE OBJECTS AND WHICH ARE THE COMMANDS?
End
OBJECT- DOGObjects have states.
Dog is brown
Dog is called Barry
AND behaviours
Barry is sitting
Barry is barking
WRITE YOUR OWN CODE:
At least 4 OBJECTS
At least 3 VARIABLES
Try and include a branch and a loop!
10 minutes
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
Homemade Béchamel SauceSee Recipe for
Homemade
Béchamel Sauce
STARTER
Can you draw
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.
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.