CS 141 Lab 1r -- First Ruby programs

Before you do this lab, you must install Ruby on your home directory. The instructions for that are in Lab 0.

To access the Ruby programs you write, you must mount your home directory. It's the Willamette icon... the W in the dock.

You also need to start NetBeans and open the Ruby project. Look back at Lab 0 if it's slipped your mind.

So, assuming you are at a Mac, with your home directory mounted, and running NetBeans, with the Ruby project open, you are ready to write your first programs in Ruby. Here's how:

First; open Program.java, so you can edit the program (to do the lab, below).
  1. On the left of the screen Projects tab, open ruby, then Source Packages, then ruby
  2. Now, double-click Program.java, it should open in the big text area on the right. You can edit it like any text file (which is what it *is*!).

Due date: The end of lab, Friday 8/29

Work in pairs. If you don't have a programming partner yet, find one!

There are many details that must be correct before programs can work; I will try to present all the information you need to so the lab, but, with many details, it is easy to forget some of them. With two brains instead of one there is a better chance that at least one of you will remember the necessary details!

Even though you are working in pairs, both partners should end up understanding what was done, that's what the tests will test, whether you understand the material.

First Ruby tasks .

Tasks 1_6 and 1_7 are optional

How to get credit:

Demonstrate task1_5 by the end of lab on Friday.