CS 145 Lecture 22 – Loops IV
Agenda what ?s program this inverting a BufferedImage blackboxes TODO No Weekly Outside Problem this week. Mercy Fortnight expires before Friday. Blackboxes Blackbox 7 Blackbox 6 Blackbox 8 Program This Code GetThird.java Image.java Inverter.java Haiku
CS 145 Lecture 21 – Image Manipulation
Agenda what ?s working with images program this Program This Grayscale images are two-dimensional grids of pixels. Each pixel is represented as an int in [0, 255], with 0 being black and 255 being white. Imagine a grayscale image that can be generated with an algorithm. Many patterns and shapes can be produced by algorithms. Write […]
CS 145 Lecture 20 – For Loops
Agenda what ?s alphabet fillDown indexOf program this TODO Start homework 4, which is due before October 31. This is a full homework. You will want to use the full two weeks. Read sections 5.1, 2.3-2.4, and 4.2. Turn in next lecture a 1/4 sheet with questions, observations, and examples of algorithmic repetition you see […]
CS 145 Lab 5 – Loops
First, if you have checkpoints left over from last lab, get them inspected during the first 15 minutes of this lab. No credit will be awarded past these 15 minutes. Don’t forget to work in pairs! Where possible, please work with someone that you did not work with last week. The exchange of new ideas and […]
CS 145 Homework 4 – due before October 31
See the PDF.
CS 145 Lecture 19 – Looping II
Agenda what ?s predicate chain game program this loops driven by user input sharing birthdays for loops Predicate Chain Game Decide upon a yes-or-no that you can ask about someone–a predicate. If you were to ask yourself this question, you would say yes. For example: Are you related to Abraham Lincoln? Ask your right-neighbor this question. If […]
CS 145 Lecture 18 – Hello, While
Agenda what ?s mercy fortnight repeating yourself flashcards acrostic Mercy Fortnight If you did not get credit for homeworks 1, 2, or 3, you have an opportunity to rectify this during the next two weeks. I will regrade a homework submission under the following conditions: You correctly solve one of the problems below from Project Euler. […]
CS 145 Lecture 17 – Pigeon-holing with Conditional Statements
Agenda what ?s what does this do? TODO Compose on a 1/4 sheet a question to share before the quiz in lab on Monday. Revisiting Precedence of && and || Is there a combination of values for a, b, and c that produces different values for the two expressions (a && b) || c and a && […]
CS 145 Lecture 16 – Shortcircuiting and Truthtables
Agenda what ?s short circuiting truthtables TODO Read section 4.1. On a 1/4 sheet, share four thoughts: questions, observations, or sightings of conditional logic in your life. Code Trick.java CheckT.java Haiku
CS 145 Lecture 15 – Conditional Statements
Agenda what ?s conditional statements sidesteps bifurcations pigeon-holing Code Sidesteps.java Bifurcations.java BirthdayDay.java Haiku