teaching machines

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 491 Lecture 21 – Bluecheckers

Agenda explore GLSurfaceView hook GLSurfaceView.Renderer callbacks up to our C++ renderer incorporate UI events 3-D on Android Android offers a special GLSurfaceView for fast rendering. It also provides Java bindings for the OpenGL library. This added layer can reduce performance, so ultimately we’re going to want to use our low-level C++ code to do all […]

Timing Android voice recognition

I was curious whether the EXTRA_MAX_RESULTS value affected the time it takes to get voice recognition results back to an Android device, so I ran a couple of quick tests. In the first, I spoke the phrase “Binky the ball bounced away” a few times each for different EXTRA_MAX_RESULTS settings. I tried 1, 5, 20, […]

CS 491 Lecture 20 – OpenGL ES

Agenda discuss the OpenGL framework develop 3-D on the desktop in C++ migrate C++ to our Android device using JNI get a lit sphere running on a mobile device OpenGL ES It comes time in everyone’s life for a little 3-D. The process of taking 3-D objects and showing them on a 2-D screen is […]

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

CS 145 Lecture 21 – Our own objects

Agenda command-line arguments writing an NDeckerBurger class writing a class: Figure out what it needs to do. (Methods.) Figure out what its persistent state is. (Instance variables.) Figure out how to initialize the state. (Constructor.) midterm 2 Code CommandLineArguments.java package lecture; public class CommandLineArguments { public static void main(String[] args) { // for (int i […]

CS 145 Lab 10

Reminder Show your TA or instructor your completed checkpoints from the last lab in the first 20 minutes of this lab. Object-orientation As we’ve seen in lecture, objects are the marriage of data (instance variables, declared at the class level) and methods. Up until now, our programming has been action- or procedure-oriented. We wrote methods […]

1 195 196 197 198 199 204