VB+Programming

=S4 Programming using Visual Basic=

Use Lightbot to explain programming principles like instructions, testing and functions []
 * Lesson 0 - Lightbot programming**

Introduction to object orientated programming How to start VB, create a project Create a button, place on form Program button - Msgbox("Hello World")
 * Lesson 1** **- Thursday 21/8**

Tasks: 1. get button to say more than one thing (add extra MsgBox lines) 2. Change the font and font colour of the button 3. Change the colour of the button and the form 4. Create another button on the same form to do something else Ext - hint about images / photos

Program buttons to do something else: 1. Buttons to change the background colour of the form 2. Buttons to change the background colour of the button
 * Lesson 2 - Tuesday 26/8**
 * Colourful Buttons handout**

Discuss - what variables are, used in maths when we don't know answer, Demo - using boxes for name and age (string and integer) Task - enter the two programs on the worksheet Task - create a program to ask the user for two things (class, favourite subject, football team, etc)
 * Lesson 3 -** **Thursday** **28/8**
 * Variables worksheet**

Discuss - ways for users to input information. Message boxes now input boxes Demo - how to create a textbox. How to then create a program to add two numbers Task - Create a program to add two numbers Task - adapt program to subtract, multiply then divide two numbers Task - Create three new buttons, so there are four buttons for add, subtract, multiply and divide Task - create a program to work out how much someone will get paid, given number of hours and amount per hour //Didn't get onto last task for the Pay Day calculator//
 * Lesson 4 -** **Tuesday** **2/9**
 * Text boxes and Calculator**

Demo - listboxes for fruit and clear button using a fruit variable Task - Create a program for the user to enter fruit (or colour or football team etc) Demo - asking for information without setting up a variable (global vs local) Task - Create a program to ask for three facts and put them in a listbox (eg name, class and favourite subject)
 * Lesson 5 -** **Thursday** **4/9**
 * Listboxes worksheets**

Consequences game** Demo - play paper version of Consequences Demo - show VB version of game running Discuss - what is needed to create the game (variables and names, textboxes, labels, button, code) Handout - Consequences template Task - create Consequences program Class task - when everyone is finished, all run the programs, type in boys name, move computer, type in girls name, etc //Didn't complete class task, most people finished though.//
 * Lesson 6 -** **Tuesday** **9/9

Calculator worksheet** Finish last task on Calculator worksheet (Pay day calculator) SQA Food Mixers task
 * Lesson 7 - Thursday 11/9

Write answers for Q1,2,4 on SQA Food Mixers task Continue on with programming the Food Mixers task
 * Lesson 8 - Tuesday 16/9**

Finish off Food Mixers task //Network problems - started looking at For/Next loops instead//
 * Lesson 9 - Thursday 18/9**

Finish off Food Mixers task
 * Lesson 10 - Tuesday 23/9**

VB Naming Conventions sheet: Discuss - Talk about why good practice to name variables and objects in a particular way, explained long words Whole Class Task - pupils highlighted variable types and objects that they had encountered so far Whole class task - described situations when variables and objects might be used and wrote down best name to use
 * Lesson 11 - Thursday 25/9**

Task - For/Next loops using Repetitions sheet 1 (and sheet 2 if finished)

Whole class discussion / task - Object and Variable Naming Exercise sheets Discuss - Commenting code - showed example on board Task - open a previous program, add a comment for every line Task - Use example on Repetitions sheet 1, write program to take a name and display 5 times with a blank line in between
 * Lesson 12 - Tuesday 30/9**

Continue Task - Use example on Repetitions sheet 1, write program to take a name and display 5 times with a blank line in between Start SQA Car Stickers task - all class at desks working on written questions and plan.
 * Lesson 13 - Thursday 2/10**

Free time
 * Lesson 14 - Tuesday 7/10**

Finish SQA Car Stickers task, plus work on finishing other SQA tasks and project
 * Lesson 15 - Thursday 9/10**

October Break

Task: in teams design a laptop for kids aged 6-10
 * Lesson 16 - Tuesday 28/10**
 * A D I** T D E M
 * Analysis** - make notes about the task, think about how you're going to do it. Ask questions of the ToysRUs client (the teacher) such as cost (RRP), speed, specification, etc. Negotiate their cut of the final RRP price for 1000 units. Questions and negotiations NOT shared with whole class just each production team.
 * Design** - sketch a design of the laptop with labels showing key features. Suggest options like material, screen size (and weight), colour and design, keyboard colour and layout (eg different coloured keys, uppercase or lowercase printing, or even illuminated), functions and facilities (internet filtering, language games, etc) If design includes trademark images (eg Simpsons) permissions cost must be considered.
 * Implementation** - explain in this phase a demo would be manufactured. Their task is to make a single page brochure advertising the laptop

Discuss the other four phases briefly

A D I **T D E M**
 * Lesson 17 - Thursday 30/10**
 * Testing** - discuss how the laptop prototype will be tested
 * Documentation** - what documentation will be included with the laptop (warranty, manual, quick start guide, instructions for kids or parents?)
 * Evaluation** - present to the rest of the class and get feedback
 * Maintenance** - Microsoft find a bug in the operating system while you are producing the laptops - what are you going to do? You find part of the hardware breaks easily - what do you do?

A Dance In The Dark Every Monday Write notes. Come up with better phrase!

Later: Errors theory worksheet - Exercise 1 Errors theory worksheet - Exercise 2 and 3

**Still to cover / If time get on to....**
IF worksheets - simple and complex IF and password protection (to show another form or a picture?) IF and radio buttons, Pizza ordering program (display pictures of objects) Ext task - McArthur's Burgers task
 * IF statements** - Inputbox ask for a colour. If = red msgbox "fantastic" else msgbox "blech"

Whole class discussion - Pseudocode - work through example of having a party or organising a theatre / fashion show
 * 1) decide when to have party
 * 2) decide who to invite
 * 3) Book venue
 * 4) send out invites
 * 5) buy food and decorations
 * 6) put up decorations
 * 7) prepare food
 * 8) put on music
 * 9) have fun

Hogmanay Ticket program - example Hogmanay ticket program - ordering game SQA Car Hire task (General)

SQA School Heating (General)

Analysis / Design / Implementation / Testing / Documentation / Evaluation / Maintenance Think of an an acronym instead of A Dance In The Dark Every Monday Write notes about each phase
 * Software Development Cycle:**

Machine code LLL vs HLL Compiling / Translating
 * Programming Language theory:**