U2D13 Oct 10
Unit 2 Summative
As mentioned in class - we will use the four programs from the Oct 7 Algorithms as the unit 2 summative. On Tuesday we will have a 10 question quiz based on the unit review from October 9. You will then have the rest of the period to work on your programs. At the end of the period zip the four folders containing the programs and upload them to D2L
Assessment of Learning
- Knowledge - did you hand in four programs (if statements, for loop, do or while loop, string)
- Thinking - did you include a plan for each one (at least one done by Top Down, Stepwise Refinement, you can also use IPO charts)
- Communication - did you include comments in the code for your name, date and what the assignment is about, did you comment what your code use? Use // for comments
- Application - Does the program work? Does it do what it should? Can you make it so I can't crash it easily?
U2D10 Oct 7 Algorithms
An algorithm is a step by step procedure that you use to solve a problem. For example, an algorithm for cleaning your room would be:
- while there are clothes on the floor:
- Pick up clothing item from floor
- if clothing item is clean
- Put clothing item on shelf
- else
- Put clothing item in laundry
Your Google Drive contains todays PowerPoint and the list of assignments to do.
U2D8 Oct 3
While loop
A while loop is used to run a block of code as long as a certain condition is met.
U2D6 Repetition
Oct 1
for loops are used to repeat an activity for a certain number of times.for(int i = 0; i < 10; i++)
{
this code will run 10 times
}
int i = 0 - this sets a counter (the variable i) and starts it at 0.
i < 10 - this is the condition, as long as i is less than 10 the loop will run
i++ - every time the loop runs 1 will be added to i. You could use i-- to subtract instead, or i = i+2 to go up by two
Note: there is no ; after the loop. Instead a block of code runs between { and }
U2D5 Advanced if statements
Sept 30
&& represents AND - both conditions must be true:if((true) && (true))
{this would run}
if((true) && (false))
{this would not run}
|| represents OR - one or the other condition must be true:
if((true)||(true))
{this would run}
if((true)||(false))
{this would run}
if((false)||(false))
{this NOT would run}
! represents NOT - the opposite condition will run:
if(!(true))
{this would not run}
if(!(false))
{this would run}
U2D3 String methods and properties
Sept 26-27
We covered a lot! A string variable is a sequence of characters.
Declare a string
string studentName;
Assign a value:
studentName = "Suzy";
.Net
When I type the name of a string variable followed by the period
studentName
I get a list of different items. Items with the
icon are properties. For example:
studentName.Length
will give me an int value that is the length of the variable (Suzy has 4 letters so the Length is 4).
Items with the
icon are methods. They require brackets and possibly paramaters to access. For example:
studentName.IndexOf("S");
will return a value of 0 indicating that the letter S is found in the 0 position (remember that computers start counting at 0). Lots of information on strings can be found here.
if statements
if statements allow you to make decicions. They look like this:
if(some condition that is true or false) { //Code that will run if true }else{ //Code that will run if NOT true }
Note how there is no semicolon (;) after the if statement. Instead the block of code runs between { and }
U2D2 Selection
Sept 25
Today the goal is to work on creating our multiplication program it must include the following:
- A random number generator (covered in class today)
- An if statement to check if the answer is correct
- Two global variables to keep track of the values being multiplied
- Form layout that is pleasing to the eye and large enough to be seen projected
- The audience is a 9 year old boy - style your design (colours, fonts) to that audience
- Appropriate data entry (i.e. numericupdown for numbers
- Some method of feedback to indicate right or wrong answers
- The ability to get another random question (we are only multiplying values from 1-12)
U2D1 Selection
A programmer’s wife sends him to the grocery store with the instructions, “get a loaf of bread, and if they have eggs, get a dozen.” He comes home with a dozen loafs of bread and tells her, “they had eggs.”
Big Idea: Be able to use selection statements in programs.
Minds on: If statement stations
Activity: Rocket ship countdown program
If time we will start the multiplication challenge program
Consolidation: Boolean operator type challenge.
U1D5 Careers
Here are the links to the different college programs you can pick from:
Textbook
For a textbook we will be using a series of powerpoints. You can access the first powerpoints from your TLDSB Google account (I will show you how on the first day of classes if you haven't accessed it before). We will be using Visual Studio Professional (available through Dreamspark).
This course introduces students to computer programming concepts and practices. Students will write and test computer programs, using various problem-solving strategies. They will learn the fundamentals of program design and apply a software development life-cycle model to a software development project. Students will also learn about computer environments and systems, and explore environmental issues related to computers, safe computing practices, emerging technologies, and postsecondary opportunities in computer-related fields.