CS 145 Lab 10 – Objects and ArrayList

Welcome to lab 10! If you have checkpoints from the last lab to show your instructor or TA, do so immediately. No credit will be given if you have not already completed the work, nor will credit be given after the first 10 minutes of this lab. In this lab you will create our own […]

CS 352 Lecture 31 – Framebuffer

Dear students, Today we continue our discussion of working more directly with I/O devices by reading and writing to their device files in Linux. Last time we reverse engineered the PS/2 mouse protocol. This time we use the Linux input_event API to read from keyboard. With two input devices to read from, we’ll encounter an […]

CS 145 Lecture 30 – ArrayList

Dear students, Arrays make the modern world happen. The computer itself can be viewed as one big array, lining up all our data, music, photos, and movies on disks and in RAM. However, arrays have their limits. In particular, arrays are fixed in size. We need to know their size when we create them. Sometimes […]

CS 352 Lecture 30 – Mouse

Dear students, Today we’re going to do something a little different. I don’t think me lecturing is the best way for you to learn, but I don’t think there’s enough time in a semester to do much better. I am always looking for ways to step back and let you more actively participate. Today, we […]

CS 145 Lecture 29 – Arrays in Two Dimensions

Dear students, We’ve seen that we can create an array like this: type[] id = new type[#]; That type can be anything, like int, String, double, boolean, BufferedImage, and so on. It can also be another array: type[][] id = new type[#][]; Just as 1D arrays let us use one integer to map into a […]

CS 352 Lecture 29 – Functions Cont’d

Dear students, We try as hard as we can to use registers for our calculations, but we cannot always avoid going to memory. Today we will look at how variables inside functions are allocated, accessed, and freed through a few more examples. Unlike registers and globals, stack and heap variables don’t have names. We must […]

CS 491 Meeting 10

Dear students, We are in the working phase of developing our games, so most of our time will be spent giving weekly progress reports. Here are some questions we will probably ask you: What’s the riskiest part left to investigate in your endeavor? What three or more specific things will you accomplish before we meet […]

CS 145 Lecture 28 – Arrays * 4

Dear students, With arrays, we are treating the computer as a factory worker, performing some automated task on every item rolling through an assembly line. It’s these mindlessly repetitive tasks that make computers so compelling. While they do the grunt work, we can move on to a more intellectually-challenging exercise, like getting the machine running […]