Introduction
The objectives of this lab are to:
- Get you thinking about solving problems using recursion, in which a method tackles a small portion of problem and then calls itself to solve the rest.
- Show that many problems that are difficult to do with loops can be solved much more simply with recursion.
Your first step is to create a new project named project7
and in it a package called lab7
. You could go ahead and import the sample code we'll refer to,
so that you can run it yourself:
- RecursiveDeli.java
- ArraySum.java
- ArraySumVerbose.java
- FileTest.java
- FileLister.java
- FileLister2.java