Lecture 25 Objectives [Dec 11]prev next

ART MOMENT:
 

A Game of Tric-Trac
Artist: Judith Leyster (1609-1660)
Date: 1630-1660


With student id, museum tickets cost only $8


By the beginning of today's class you should

HAVE READ:

KNOW:

BE ABLE TO:

DAILY QUESTION:


Sample Exam question(s)

  1. What is wrong with the following recursive implementation of a search in a LinkedList. This method is found in the NumberNode class:

     
    /**
     * Recursive implementation
     */
    public boolean find (int i) {
      // base case(s)
      if (value == i) {
        return true;
      }

      // recurse onwards!
      return next.find(i);
    }

     

  2. Write a recursive solution that prints to the screen all vowels found in a String:

     
    /**
     * Recursive implementation to print to the screen just the
     * vowels of the String.

     */
    public static void printVowels (String s) {
      // base case(s)


      // recurse onwards!

    }