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.
teletype
plugin to easily collaborate with a partner.These instructions assume you are working on an Apple (MacOS) and have the following software:
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.
$ 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.
cosc290
and plan to save your work in there.cosc290
folder. Please be sure to save as a .zip file and do not open it (yet). 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.
ArraySet.java
to gradescope. You should see some tests run and none of them pass.ArraySet.java
in Atom. Edit the body of the in
method so it always returns true
.ArraySet.java
. The first test should now pass. This marks the completion of this portion of the lab.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.)
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.