CS 112 - Introduction to Computer Science II
Homework #1


Assignment work will be individual for this assignment only.  Due: at the beginning of class 3.  Include a README file with the honor pledge, your name and student ID, and written exercises.  We will cover the submission process in class.  Be sure to have your README and ModularPascalsTriangle.java in the same default package directory.

If you'd like to submit your work before Friday and get correctness feedback on your ModularPascalsTriangle.java, this is how we'll be submitting work together in class on Friday:

 

1. Bash: Have you already learned the basics of the bash shell as represented in our tutorial

2. Eclipse: (Optional: Watch the Deitel Eclipse introduction video. This can be viewed on non-Linux campus computers.)  In class: Do the Eclipse tutorial "Create a Hello World application".  Get to the Welcome screen either at first startup or via Help→Welcome.  Choose "Tutorials".  Under "Java Development", choose "Create a Hello World application".  Follow the tutorial instructions step-by-step in the "Welcome" tab in the right margin.  Since we'll be doing this in class, there will be nothing you'll need to submit; your attendance and participation will give you full credit.

Note: We will be changing one default in Eclipse. Window → Preferences → Java → Build Path: Select "Project" radio button for "Source and output folder". Click "Apply and Close" button. Do this before creating your first Java project.

The more you know of your work environment, the more efficient you will be.  A little time spent above and beyond these tutorials will likely pay off significantly in the long run as a CS major/minor.

3. Modular Pascal's Triangle: Read about Pascal's Triangle. For this exercise, you will be computing a 2D array with a Modular Pascal's Triangle, that is, a Pascal's Triangle formed with modular addition.  (This will be similar in arrangement to the last Fibonacci pattern figure of this Wikipedia article section, with blank areas filled with 0's.)  Implement and submit ModularPascalsTriangle.java according to this specification

Hint: It will be easiest if you approach this as we approached the creation of BankAccount in class:

A ModularPascalsTriangle video tutorial for setting up your class definition is also available. NOTE: This does NOT cover how to do the core modular Pascal's triangle computation. That's your independent work.

You'll also need to create a field for your 2D array of values, initialization code for it in your constructor, and the specified getter method for reading individual values from it given a row and column.

Optionally, here's some fun you can have while testing your program:

4. Pair Programming: In this course, you'll practice the Agile software development practice of Pair Programming (described simply here) for producing correct, high-quality solutions.  In your README file, include a single paragraph that defines "pair programming" and describes a summary of the practice in your own words.

Rubric: (20 points total)