teaching machines

CS 145 Lecture 3

Agenda String Scanner objects vs. primitives methods vs. operators a bunch of common String methods KML Code StringFun.java package lecture; import java.util.Scanner; public class StringFun { public static void main(String[] args) { char letter = ‘a’; String alphabet = “abcdefghijklmnopqrstuvwxyz”; int sizeOfAlphabet = alphabet.length(); System.out.println(sizeOfAlphabet); Scanner in = new Scanner(System.in); // System.out.println(“Enter something, NOW: “); […]

CS 491 Lecture 4 – Ketchup

Agenda Continue publication of PopMusic Get to discussion of autoporting Design Ketchup Draft non-trivial XML layout of game screen Autoporting A major feature of Android market is that you can sell your apps to people all over the world and probably in the ISS too. However, English is spoken by about only a quarter of […]

CS 145 Lab 2

This lab builds on your readings and lecture discussion of variables and arithmetic operators. We’ll also see two new types, Scanner and String. Before you get started: Load the workspace you made last lab. It should be on your H: drive — not C:. Make a new package named lab2 in your cs145 project. Reminder […]

CS 145 Preassignment 1 – due before Friday, 9/23

See the PDF. Download speccheck_pre1.jar. Internet Explorer has an annoying habit of renaming this file. Make sure it ends in *.jar and not *.zip.

CS 491 Lecture 3 – Publish and polish

Agenda Toggle between popped and unpopped images Play popping sounds Fullscreenify it Persist data? Autoporting to different languages and screen densities Publish app Playing media There are a couple of ways to play media using stock Android software. The class MediaPlayer is the simplest, and it can play resources given their ID. We have a […]

CS 145 Lecture 2

Topics Covered Can we break the paperclip chain record? Boolean The nature of primitive types Switching between types Penny-based RAM Higher-level operations in the Math class Calculating cow-path savings What does this do? int a = 7; int b = 3; b = a + b; int i; System.out.println(i); int i = 100; System.out.println(i / […]

CS 145 Lecture 1

Topics Covered Hi Computer science is the study of process Variables Assignment operator Arithmetic operators Code MathFun.java package lecture; public class MathFun { public static void main(String[] args) { System.out.println(5 + 5); System.out.println(5 – 100); System.out.println(5 * 100); System.out.println(5 / 100); double taxRate = 0.055; double costOfPaulsBikeTire = 26.0; System.out.println(26 + 26 * 0.055); System.out.println(26 […]

CS 491 Lecture 2 – PopMusic

Today we continue our discussion of Android development and start to dissect the pillars of all interactive applications: the classes Activity and View. Before that, though, let’s gather some requirements and do some rough design for today’s app: a bubble-wrap popper. Partner up with a neighbor and take 5 minutes to answer some questions: What […]

CS 491 Lecture 1 – Restaurand

Welcome to the course notes for CS 491, Mobile Software Development. You can subscribe to RSS feed with your favorite reader. (I use Google Reader.) Take a moment to check out the syllabus! Introduction Hi. My first cell phone had a cord. It was so big I couldn’t fit it under my car seat. It […]