Welcome to 290

Due
Tue Sep 10 11:59 pm
Submission
Please submit your work using Gradescope.

The goal of this lab is to get you set up with all of the course-related resources and walk through the steps involved in completing a lab assignment.

  1. Complete the “walk through.”
  2. (Recommended) Install the teletype plugin to easily collaborate with a partner.
  3. (Optional) Get set up on the lab server so that you can easily work on your lab from any machine. See “Using birds.cs.colgate.edu” below.

Lab assignment walk through

These instructions assume you are working on an Apple (MacOS) and have the following software:

  • Atom, a program for editing code
  • Java (version 8 or higher)
  • Terminal, a program that provides command line access

If you want to use your own machine, as opposed to a lab machine, you are responsible for getting it set up. You may also consider using birds.cs.colgate.edu.

In this course, we will use a few basic Linux commands – each one will be explained as we go, but you may want a cheat sheet for reference.

  1. Open up Terminal. Execute this command:
     $ javac -version
    

    You should see either a verison number starting with 1.8 or 1.9 or 10. If not, you must update java or use a lab machine, all of which have an up-to-date version.

  2. Create a folder (aka directory) on your Desktop called cosc290 and plan to save your work in there.
  3. Go to lab1 and download the starter files (see link above) and place them in the cosc290 folder. Please be sure to save as a .zip file and do not open it (yet).
  4. Execute the following sequence of commands at the prompt:
     cd /Users/mhay/Desktop/cosc290/    # change directory (be sure to replace mhay with your user name)
     unzip lab1.zip
     cd lab1     # change directory to lab1
     javac -Xlint:unchecked *.java   # compile java files, show warnings about object casts that are unchecked
     java ArraySet  # run the main method
    

    If all goes well, you should see this:

     Exception in thread "main" java.lang.UnsupportedOperationException: implement me!
     	at ArraySet.in(ArraySet.java:40)
     	at ArraySet.main(ArraySet.java:106)
    

    If you run into trouble, ask for help.

  5. Register an account at Gradescope using the provided entry code. I will be using Gradescope to collect/grade your work.
  6. Upload ArraySet.java to gradescope. You should see some tests run and none of them pass.
  7. Open ArraySet.java in Atom. Edit the body of the in method so it always returns true.
  8. Go back to gradescope and upload the revised ArraySet.java. The first test should now pass. This marks the completion of this portion of the lab.

Install Atom teletype plugin (optional)

During lab, you will be working with a partner. The teletype plugin allows you to collaboratively edit the same files on two different machines (similar to Google Docs).

Follow the installation instructions. (It does require a github account to login but you do not need to use github to complete the assignments.)

Using birds.cs.colgate.edu

This is OPTIONAL and generally not recommended (but some students who are taking or took COSC 301 ask about this).

Complete the following instructions.

Note: to upload to gradescope, you will need to save your files locally. With the Atom plugin (described in the instructions), this is easy. Alternatively, Gradescope allows you to upload from from a github repo.