teaching machines

CS1: Lecture 4 – Math Methods

Dear students, Today we introduce the Math class. This class has a bunch of pre-written recipes for computing various mathematical operations. We can see what it all provides by looking at its documentation. I usually find the documentation for a class by searching java ClassName in my favorite search engine. The Math class is full […]

CS 148 Lab 2 – Scanner

Welcome to the lab 2! Our goal today is to become more familiar with user interaction and the various mathematical operations. Checkpoint 1 Person A, take control of the machine! Let’s write a program that prompts the user for two colors and mixes them together. This sort of routine is used all the time when […]

CS1: Lecture 3 – More Math

Dear students, Last time we started writing programs that performed little mathematical calculations for us. We used text to talk to the user in a more friendly way than the calculator. We used int for whole number data, and double for numbers with fractions. We used Scanner to get input. Writing programs is a new […]

CS 145 Lab 1 – Scanner

Welcome to the first lab of CS 145! Protocol Lab is a time intended for you to work on programming exercises in a low-stakes environment and with lots of help at your disposal. Read each of these out loud with your lab partner and check them off to acknowledge your understanding: You complete a few […]

CS1: Lecture 2 – Computer as Calculator

Dear students, Last time we inspected several programs and formulated these several decrees made by the designers of Java that explain why our programs are what they are: Decree 1: There is data and there are instructions. Decree 2: Code can be ours, or it can be someone else’s. Decree 3: Data can be mailed […]

CS 148 Lab 1 – Madeup, Homework 0, and Project Euler

Welcome to the first lab of CS 148! In the first half of today’s lab, we’re going to explore a language for making 3D models. We won’t be using this language for anything else in the semester, but it gets us thinking about programming in a visual way. We’ll start with a quick demo. In […]

CS 1 – Introduction to Programming

Course Information Syllabus Enrollment: CS 145: ~90 CS 148: ~30 Office Hours Lectures Labs for CS 145 Labs for CS 148 Homework Exams

CS1: Lecture 1 – Hello, CS1

Dear students, Welcome to CS 145: Programming for New Programmers or CS 148: Programming for Experienced Programmers! It’s important to me that we have a comfortable working relationship. We are, after all, on the same team. You wanted to prepare yourself for a bright future, and so you asked me to give you some homework […]

Homework 6 – A-routes – due December 15

Your objective in this homework is to learn how to marry data and code—or state and behaviors—into objects. You will do this in the context of writing a program that maps routes of runs (or jogs or walks) in Google Earth or Google Maps. The intent of the program is to promote exercise by making […]

Homework 5 – Plaid Scientist – due December 1

Your objective in this homework is to learn how to organize and process data using arrays. You will do this in the context of writing a program that generates plaid patterns. Arrays have two features that are indispensible when building software: they help us manage large sequences of data by collecting the data into a […]

1 29 30 31 32 33 233