Lab 2: Progressions

Objectives. The objectives of this lab are:

Installing DrJava

DrJava is an easy-to-use open source integrated development environment (IDE) for Java. An IDE includes an editor, compiler, and run-time environment for Java within the same application. Download and install DrJava by following these instructions. Once DrJava is correctly installed, return to this page and proceed to complete the lab exercise.

Part I: Progression 1

Source

Goodrich and Tamassia, p. 93, Problem C-2.2

Write a Java class that extends the Progression class to produce a progression where each value is the absolute value of the difference between the previous two values. You should include a default constructor that starts with 2 and 200 as the first two values and a parametric constructor that starts with a specified pair of numbers as the first two values.

Suggestions

Part II: Progression 2

Source

Goodrich and Tamassia, p. 93, Problem C-2.3

Write a Java class that extends the Progression class to produce a progression where each value is the square root of the previous value. (Note that you can no longer represent each value with an integer.) You should include a default constructor that starts with 65,536 as the first value and a parametric constructor that starts with a specified (double) number as a first value.

You're done. Great work!