Colorado State University

CS160: Foundations in Programming: Summmer 2016


Recitation R0 - Introduction to Programming


Preview

The goals of this lab are as follows:

Logging In

  1. Login to the machine using your electronic ID (same username that you use for RamWeb).
  2. The password should be your student ID (the nine digit number on your RamCard).
  3. The TA will show you how to change your password.
Raise your hand if you cannot login!

Linux

Linux Commands

Linux Operating System

Instructions

  1. Open a terminal window by going to the upper left corner of the screen, then select "Activities" and then "Applications"
  2. change directories to your "Documents" folder
  3. make a directory in your your current directory called Practice
  4. change directories into your Practice directory, open "gedit" by typing gedit &
  5. type your first and last name. Save the file as file0 in your Practice directory
  6. copy file0 to a new file called newFile
  7. type pwd into the terminal. What is printed? What does it mean?
  8. use the diff command to see if file0 and newFile are the same. What do you expect to happen?
  9. open "gedit" again by typing gedit newFile & enter a fun fact about yourself under your first and last name
  10. use the diff command again to see if file0 and newFile are the same
  11. use cat to print the contents of newFile
  12. remove file0
  13. move newFile to your home directory
  14. change directories to your home directory
  15. list what is in that directory

Class Website

  1. Start your preferred internet browser and type in the url www.cs.colostate.edu/~cs160.
  2. Look at the syllabus and progress pages.
  3. Find the lab instructions for today.
  4. Open another tab and type in the url http://info.canvas.colostate.edu/login.aspx.
  5. Login to Canvas using your EID and password and make sure you can see CS160.

Launching Applications

  1. Your TA will show you how to launch applications and add them to the task bar.
  2. Run firefox, gedit, file manager, and a terminal.
  3. The terminal command brings up a window where you can type in Linux commands

Using Eclipse

Eclipse makes programming easier by compiling and running your programs in a single step. Your TA will go over setting up Eclipse and your workspace.

Adding a Header to New Files

Creating a Header Shortcut


Starting Assignment

Your TA will guide you in creating a project called R0, copying the Java file through the terminal, and using the shortcut in eclipse to insert your header.
NOTE: unless otherwise specified print with a new line.

Sample Output

Your program should print seven lines, and should match the output shown below, except as described here. You must print exactly the strings shown on the first and second lines. Spelling errors, incorrect capitalization, extra or missing white space and any other difference will cause a failure. The third line will have your name instead of mine. The fourth line will not be checked, but must be present. The fifth and sixth lines must have exactly the strings shown. The seventh line must follow the specification given above. See the grading criteria below for additional information.
Computer Science is great!
Java Programming can be fun.
Halladay, Gareth
Computer Science
CS160 Foundations in Programming
6/14/2016
I am in this class because programming is a lot of fun.

Specifications

Your program must meet the following specifications:

Grading

Submit your program to the Checkin tab on the course website, as you were shown by your TA. For detailed information on Eclipse, check out the Eclipse website.
© 2016 CS160 Colorado State University. All Rights Reserved.