teaching machines

CS 145 Lecture 1 – Introduction, data, and arithmetic operators

Agenda introduction our class: prior programming experience majors communication math two fronts: data and instructions arithmetic operators variables data: ints and doubles instructions: System.out.println, + – * / % = Code Mathiness.java package preexam1; public class Mathiness { public static void main(String[] args) { System.out.println(26.16 * 0.15); System.out.println(1000000.0 / 540000.0); System.out.println(); System.out.println(57 % 12); double […]

CS 145 Lab 1

Welcome CS 145 is a class where you learn to teach machines. You won’t just use them. You’re going to become a developer. Unlike the natural and social sciences, computer science and programming are not topics addressed in many of our schools. Let’s take a moment to describe what we computer scientists do with each […]

CS 145 Final

Exam

CS 145 Lecture 25 – Sound

Agenda how’d it go? generating sound (frequencies, WAV standard) binary I/O little endian vs. big endian Code LEDataOutputStream Haiku

CS 145 Lecture 24 – Growable arrays

Agenda identity per instance instance vs. static a growable String array Code … Haiku  

CS 145 Lecture 23 – Composing with objects

Agenda static vs. non-static designing a Flashlight design a room for a text adventure Code Stopwatch.java package lecture; public class Stopwatch { /** Time at which stopwatch is started */ private long startTime; /** Time at which stopwatch is stopped */ private long stopTime; /** * Starts stopwatch. */ public void start() { startTime = […]

CS 145 Homework 4 – due before 12/15

See the PDF. When you download speccheck_hw4.jar, make sure the filename ends in “.jar”.

CS 145 Lecture 22 – Designing objects

Agenda writing a Stopwatch objects hide information managing a “dungeon” with objects writing a flashlight Code Stopwatch.java package lecture; public class Stopwatch { /** Time at which stopwatch is started */ private long startTime; /** Time at which stopwatch is stopped */ private long stopTime; /** * Starts stopwatch. */ public void start() { startTime […]

CS 145 Homework 3 – due before 12/7

See the PDF. When you download speccheck_hw3.jar, make sure the filename ends in “.jar”. Here are some example image sequences: mog.zip hand.zip Feel free to contribute your own and share your resulting images on Piazza.

CS 145 Exam 2

This exam was either: far too easy, taken by very capable students, or poorly graded. I lean toward a combination of the first two. Exam

1 29 30 31 32 33 35