cs106a – Lecture #14 to #18: Yet more Java

Prerequisites to the fourteenth lecture is reading chapter 7 of “Art and Science of Java”. The lecture explains memory and how variables are stored.

Prerequisites to the fifteenth lecture is reading chapter 12.4 of “Art and Science of Java”. The lecture continues with variables, heaps and stacks and then explains how files and exceptions work.

The sixteenth lecture explains arrays, how to initialize, work with and pass them.

Prerequisites to the seventeenth lecture is reading chapters 11.1 through 11.5 of “Art and Science of Java”. The lecture continues with arrays and array lists.

Prerequisites to the eighteenth lecture is reading chapters 11.6 through 11.8 of “Art and Science of Java”. The lecture continues with arrays and introduces testing and debugging.

Code for these lectures are available on github.

FacebooktwitterredditpinterestlinkedintumblrmailFacebooktwitterredditpinterestlinkedintumblrmail

cs106a – Lecture #10 to #13: More Java

Prerequisites to the tenth lecture is reading chapters 9.1 through 9.3 of “Art and Science of Java”. The lecture provides more insight into using graphics in Java.

Prerequisites to the eleventh lecture is reading chapter 9.4 as well as chapters 10.1 through 10.4 of “Art and Science of Java”. The lecture continues with graphics (including compounds) and introduces event driven programming.

Prerequisites to the twelfth lecture is reading chapters 8.1 through 8.4 of “Art and Science of Java”. The lecture starts with enumeration and explains strings in detail.

Prerequisites to the thirteenth lecture is reading chapter 8.5 of “Art and Science of Java”. The lecture continues with strings in even more detail.

Code for these lectures are available on github.

FacebooktwitterredditpinterestlinkedintumblrmailFacebooktwitterredditpinterestlinkedintumblrmail

cs106a – Lecture #7 to #9: Further Java

Prerequisites to the seventh lecture is reading chapter 5 of “Art and Science of Java”. The lecture explains how methods are defined in Java and how parameters are handled.

Prerequisites to the eight lecture is reading chapter 6 of “Art and Science of Java”. The lecture provides an overview about instance variables and objects as well as introduction to generating random numbers.

Lecture provides further details about how to create new classes, instance variables (including shadowing), and constructors closes by introducing javadoc.

Code for these lectures are available on github.

FacebooktwitterredditpinterestlinkedintumblrmailFacebooktwitterredditpinterestlinkedintumblrmail

cs106a – Lecture #3 to #6: Starting with Java

Prerequisites to the third lecture is reading the chapters 4 to 6 of “Karel the Robot learns Java”. They provide an introduction to top-down design and algorithms.

Prerequisites to the fouth lecture is reading the chapters 1 and 2 of “Art and Science of Java”. The lecture provides a brief history of computer science and describes how the lessons learned from Karel can be translated to Java.

Prerequisites to the fifth lecture is reading chapter 3 of “Art and Science of Java”. The lecture provides an introduction into variables an data types.

Prerequisites to the sixth lecture is reading chapter 4 of “Art and Science of Java”. The lecture further introduction into using variables, their scope and how to combine them, as well as constants and last but not least combining boolean structures.

Code for these lecture as well as the used worlds are available on github.

FacebooktwitterredditpinterestlinkedintumblrmailFacebooktwitterredditpinterestlinkedintumblrmail

cs106a – Lecture #2: Programming & Control Structures

Prerequisites to the second lecture is reading the chapters 1 to 3 of “Karel the Robot learns Java”.

Karel knows four basic commands (or methods):

move()
turnLeft()
pickBeeper()
putBeeper()

To run feed Karel commands, first import Karels basic commands, create a class derived from Karel and put the commands into a run() method:
Continue reading “cs106a – Lecture #2: Programming & Control Structures”

FacebooktwitterredditpinterestlinkedintumblrmailFacebooktwitterredditpinterestlinkedintumblrmail

cs106a – Lecture #1: Introduction

The first lecture mainly provides administrative details about the course. Two text books are named to be required for the course:

  • Karel the Robot Learns Java, which is included in the iTunes stream and
  • Roberts, Eric: The Art and Science of Java with slides and code available for free at Stanford.

It also refers to the Stanford Honor Code states:

Rule 3: You must not look at solution sets or program code from other years.
Continue reading “cs106a – Lecture #1: Introduction”

FacebooktwitterredditpinterestlinkedintumblrmailFacebooktwitterredditpinterestlinkedintumblrmail

Lecture #19: Automated Testing

Please note, this blog entry is from a previous course. You might want to check out the current one.

Lecture nineteen is named “19. Automated Testing (December 6, 2011) – HD” and can be found at iTunes.

The lecturer Andy Matuschak from the UIKit team at Apple uses a short demo to introduce unit tests and automation.

Unit tests are defined by creating subclasses of SenTestCase. The actual unit tests are methods starting with the prefix test, testing expectations using STAssert* and use the methods setUP and tearDown for shared initialization and clean up.

iOS UI Automation allows to run top down tests on the user interface using the automation tool of Instruments. Actions can be recorded and the app be manipulated via UIAElements in JavaScript, which can also be used to inspect states calling UIALogger logFail/Pass methods. Within a script accessibilityLabels can be used for easy access to interface elements.

FacebooktwitterredditpinterestlinkedintumblrmailFacebooktwitterredditpinterestlinkedintumblrmail