CSC175 Intermediate Programming
Spring 2019
Homework 3


If you have the third edition

  1. Chapter 2: Exercise 4 (page 127 or click here)
  2. Chapter 3 (Recursion): Exercises 9, 12, 16 (pages 190 - 192)
  3. Write a recursive method that will compute the sum of the first n integers in an array of at least n integers. Hint: Begin with the nth integer.
  4. Describe the problem with the following recursive method:
    public void printNum (int n)
    {
        System.out.println(n);
        printNum (n - 1);
    }
    

If you have the second edition

If you have the updated edition


The assignment should be done individually.


[Back to the Assignments Index]