Lab 2: Fundamental Data Types
CS 141: Introduction to Programming, Spring 2018


This lab is due Monday, Jan 29 by the end of lab.

Pair Programming

For this lab, we will use pair programming. If there are an odd number of people, then the extra person may choose to work alone or create a group of 3.

Here is how it works [see wiki]:

"Pair programming is an agile software development technique in which two programmers work together at one workstation. One, the driver, writes code while the other, the observer or navigator, reviews each line of code as it is typed in. The two programmers switch roles frequently.

While reviewing, the observer also considers the "strategic" direction of the work, coming up with ideas for improvements and likely future problems to address. This frees the driver to focus all of his or her attention on the "tactical" aspects of completing the current task, using the observer as a safety net and guide."

Programming Problems

Do the following problems. Create a separate Netbeans project for each.:

Develop Good Programming Habits

Formatting: Make it a habit to format your Java code. Do this as you are working because it will make it easier to see the program structure which, in turn, will make it easier to locate and debug errors.

Commenting: Make it a habit to comment your code, including placing the following at the top of your code:

Deliverables

You are to turn in the Giving Change program. To receive full credit on this lab, you need to:

  1. Make sure that your Java code:

  2. Demonstrate your program to the instructor or lab assistant by the end of lab on the due date. You will be asked to display your commented/formatted code and to run the code. If your code is not properly formatted or does not give the appropriate output, you will be given the opportunity to correct the code but only if there is still time to make corrections before the due date/time. This is why it is to your benefit to complete and demonstrate your code early. You also may be asked questions about what the code is doing, how it works, and how it might be changed slightly to alter the output.

  3. Submit your code to Wise:

In general, to receive credit on a lab, you must both demo the program and submit the code to wise. Failure to do either or both will result in 0 points.