1;2401;0c CS 1110/1111: Introduction to Programming

Lecture 22


Guest lecturer! Thanks to Jim, Monika, and Casey for letting the Prof.s attend an CS education conference today.

HW5 will start after the break and will be done in pairs.

Talking Points

Humans > Methods

Anything a method can do, a human can do.

public class Volunteers {
    public static in add(int a, int b) {
        return a + b;
    public static void write(int a) {
        Write the number on the "console"
    public static int nextInt() {
        int x = the first number in the "console"
        erase the first number in the "console"
        return x;
    public static void erase() {
        erase everything in the "console"

We'll use this to play around with what method invocations do.


We'll write several methods and talk about them. These might include:

Code from 1pm

Copyright © 2014 by Luther Tychonievich. All rights reserved.