Lab 2: Fundamental Data Types
CS 141: Introduction to Programming, Fall 2015

This lab is due Wednesday, Sept 9. Be prepared to demo at the beginning of lab.
Note, no class on Monday.

Programming Problems

Do the following problems from the text. 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:


You are to turn in the expanded version of problem 13. 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: