Lab 1: Getting Started
CS 141: Introduction to Programming, Fall 2013


Homework Assignments and Due Dates

In class & lab: Netbeans Programming

Instructions for writing your first program:

  1. H Drive Folders: Before opening Netbeans, create a folder on your H drive called CS141. You should save all of the work you do in this course into this folder. Inside, make another folder called Practice. In class we will be writing a lot of practice programs. It is good to keep these separate from the labs you turn in.
  2. Open Netbeans: Double click on Netbeans to open it (if you can't find it, ask!) The icon looks like:
  3. Make a New Project:
  4. Creating a New Class: Right click on the project name in the Projects tab (left side of window). Select New->Java Class. For the Class Name, enter MyFirstClass and then click the Finish button. A new panel should open. Its tab name should be MyFirstClass.java.

  5. Entering the Code: The new panel (i.e. file) should contain several comments (these are gray in color) and the code:
    
    public class MyFirstClass {
       
    }
    

    Add code so that the final program looks like (pay careful attention to the indentation):

    
    public class MyFirstClass {
        public static void main(String[] args) {
            System.out.println("Hello Willamette!");
        }
    }
    
    Save your code but clicking the save button
  6. Running Your Program: Click the Run Project button .

    Congratulations, you have just written and run your first program!

  7. What Just Happened?: Now, exit Netbeans and navigate to your CS141\Practice folder. Look at what folders and files are stored there.

  8. Now try on your own some of the exercises in our text starting on page 25, or, if you are using the online version, go to "Read, Study, & Practice", Chapter 1, Programming Exercises

In class&lab: WileyPlus Online Programming Problems (Labrat)

In class, we will work on several practice programming problems (Labrat) on the WileyPlus website. Please make sure you understand how it works. It is important that you get help if you are having problems.